Skip to content

Commit 5fbd020

Browse files
committed
Support fetch API (future_v6_fetch option)
1 parent f3794a0 commit 5fbd020

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+4764
-1668
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ coverage
2323
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
2424
.grunt
2525

26-
# Bower dependency directory (https://bower.io/)
27-
bower_components
28-
2926
# node-waf configuration
3027
.lock-wscript
3128

.neutrinorc.js

Lines changed: 79 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,86 @@
11
module.exports = {
22
use: [
3-
['@neutrinojs/fork', {
4-
configs: {
5-
minified: {
6-
use: [
7-
(neutrino) => {
8-
lib = require('./../../../util/neutrino-library');
3+
[
4+
'@neutrinojs/fork',
5+
{
6+
configs: {
7+
minified: {
8+
use: [
9+
(neutrino) => {
10+
lib = require('./../../../util/neutrino-library');
911

10-
lib(neutrino, {
11-
name: 'recombee',
12-
filename: 'recombee-api-client.min.js',
13-
minify: true,
14-
target: 'web',
15-
externals: {
16-
whitelist: ['jssha']
17-
},
18-
babel: {
19-
presets: [
20-
['babel-preset-env', {
21-
targets: {
22-
browsers: [
23-
'last 2 Chrome versions',
24-
'last 2 Firefox versions',
25-
'last 2 Edge versions',
26-
'last 2 Opera versions',
27-
'last 2 Safari versions',
28-
'last 2 iOS versions',
29-
'> 2% in BE'
30-
]
31-
}
32-
}]
33-
]
34-
}
35-
});
36-
}
37-
]
38-
},
12+
lib(neutrino, {
13+
name: 'recombee',
14+
filename: 'recombee-api-client.min.js',
15+
minify: true,
16+
target: 'web',
17+
externals: {
18+
whitelist: ['jssha'],
19+
},
20+
babel: {
21+
presets: [
22+
[
23+
'babel-preset-env',
24+
{
25+
targets: {
26+
browsers: [
27+
'last 2 Chrome versions',
28+
'last 2 Firefox versions',
29+
'last 2 Edge versions',
30+
'last 2 Opera versions',
31+
'last 2 Safari versions',
32+
'last 2 iOS versions',
33+
'> 2% in BE',
34+
],
35+
},
36+
},
37+
],
38+
],
39+
},
40+
});
41+
},
42+
],
43+
},
3944

40-
nonminified: {
41-
use: [
42-
(neutrino) => {
43-
lib = require('./../../../util/neutrino-library');
45+
nonminified: {
46+
use: [
47+
(neutrino) => {
48+
lib = require('./../../../util/neutrino-library');
4449

45-
lib(neutrino, {
46-
name: 'recombee',
47-
filename: 'recombee-api-client.js',
48-
minify: false,
49-
target: 'web',
50-
externals: {
51-
whitelist: ['jssha'],
52-
},
53-
babel: {
54-
presets: [
55-
['babel-preset-env', {
56-
targets: {
57-
browsers: [
58-
'last 2 Chrome versions',
59-
'last 2 Firefox versions',
60-
'last 2 Edge versions',
61-
'last 2 Opera versions',
62-
'last 2 Safari versions',
63-
'last 2 iOS versions',
64-
'> 2% in BE'
65-
]
66-
}
67-
}]
68-
]
69-
}
70-
});
71-
}
72-
]
50+
lib(neutrino, {
51+
name: 'recombee',
52+
filename: 'recombee-api-client.js',
53+
minify: false,
54+
target: 'web',
55+
externals: {
56+
whitelist: ['jssha'],
57+
},
58+
babel: {
59+
presets: [
60+
[
61+
'babel-preset-env',
62+
{
63+
targets: {
64+
browsers: [
65+
'last 2 Chrome versions',
66+
'last 2 Firefox versions',
67+
'last 2 Edge versions',
68+
'last 2 Opera versions',
69+
'last 2 Safari versions',
70+
'last 2 iOS versions',
71+
'> 2% in BE',
72+
],
73+
},
74+
},
75+
],
76+
],
77+
},
78+
});
79+
},
80+
],
81+
},
7382
},
74-
}
75-
}]
76-
]
83+
},
84+
],
85+
],
7786
};

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
dist/
2+
examples/
3+
pnpm-lock.yaml
4+
README.md

.prettierrc.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
arrowParens: always
2+
printWidth: 100
3+
singleQuote: true
4+
useTabs: false
5+
tabWidth: 2
6+
overrides:
7+
- files: ['package.json']
8+
options:
9+
useTabs: false

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The library is [UMD](https://github.com/umdjs/umd) compatible.
1515
You can download [recombee-api-client.min.js](./dist/recombee-api-client.min.js) and host it at your site, or use a CDN such as [jsDelivr](https://www.jsdelivr.com/) CDN:
1616

1717
```js
18-
<script src="https://cdn.jsdelivr.net/gh/recombee/[email protected].0/dist/recombee-api-client.min.js"></script>
18+
<script src="https://cdn.jsdelivr.net/gh/recombee/[email protected].1/dist/recombee-api-client.min.js"></script>
1919
```
2020

2121
and use the global `recombee` object.
@@ -209,7 +209,7 @@ Let's assume we want to show recommendations at product page of pants `product-2
209209
</div>
210210
</div>
211211

212-
<script src="https://cdn.jsdelivr.net/gh/recombee/[email protected].0/dist/recombee-api-client.min.js"></script>
212+
<script src="https://cdn.jsdelivr.net/gh/recombee/[email protected].1/dist/recombee-api-client.min.js"></script>
213213

214214
<script type="text/javascript">
215215

bower.json

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)