browserslist 4.3.4 → 4.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/README.md +4 -3
- package/index.js +23 -4
- package/package.json +11 -4
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -111,9 +111,10 @@ from one of this sources:
|
|
|
111
111
|
* If you want to change the default set of browsers we recommend to combine
|
|
112
112
|
`last 1 version`, `not dead` with `> 0.2%` (or `> 1% in US`,
|
|
113
113
|
`> 1% in my stats`). `last n versions` adds too many dead browsers
|
|
114
|
-
and does not add popular old versions.
|
|
115
|
-
|
|
116
|
-
as we had with Internet Explorer 6.
|
|
114
|
+
and does not add popular old versions. Choosing a percentage above `0.2%`
|
|
115
|
+
will in the long run make popular browsers even more popular. We might run
|
|
116
|
+
into a monopoly and stagnation situation, as we had with Internet Explorer 6.
|
|
117
|
+
Please use this setting with caution.
|
|
117
118
|
* Don’t remove browsers just because you don’t know them. Opera Mini has
|
|
118
119
|
100 million users in Africa and it is more popular in the global market
|
|
119
120
|
than Microsoft Edge. Chinese QQ Browsers has more market share than Firefox
|
package/index.js
CHANGED
|
@@ -154,11 +154,30 @@ function resolve (queries, context) {
|
|
|
154
154
|
var args = [context].concat(match.slice(1))
|
|
155
155
|
var array = type.select.apply(browserslist, args)
|
|
156
156
|
if (isExclude) {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
157
|
+
var filter = { }
|
|
158
|
+
var browsers = { }
|
|
159
|
+
var versionLess = { }
|
|
160
|
+
array.forEach(function (j) {
|
|
161
|
+
filter[j] = true
|
|
162
|
+
var browser = j.replace(/\s\S+$/, '')
|
|
163
|
+
browsers[browser] = true
|
|
164
|
+
if (/\s0$/.test(j)) {
|
|
165
|
+
versionLess[browser] = true
|
|
166
|
+
}
|
|
167
|
+
})
|
|
160
168
|
return result.filter(function (j) {
|
|
161
|
-
|
|
169
|
+
if (filter[j]) {
|
|
170
|
+
return false
|
|
171
|
+
} else {
|
|
172
|
+
var browser = j.replace(/\s\S+$/, '')
|
|
173
|
+
if (versionLess[browser]) {
|
|
174
|
+
return false
|
|
175
|
+
} else if (/\s0$/.test(j) && browsers[browser]) {
|
|
176
|
+
return false
|
|
177
|
+
} else {
|
|
178
|
+
return true
|
|
179
|
+
}
|
|
180
|
+
}
|
|
162
181
|
})
|
|
163
182
|
}
|
|
164
183
|
return result.concat(array)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browserslist",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.5",
|
|
4
4
|
"description": "Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"caniuse",
|
|
@@ -11,13 +11,20 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"repository": "browserslist/browserslist",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"caniuse-lite": "^1.0.
|
|
15
|
-
"electron-to-chromium": "^1.3.
|
|
16
|
-
"node-releases": "^1.0.
|
|
14
|
+
"caniuse-lite": "^1.0.30000912",
|
|
15
|
+
"electron-to-chromium": "^1.3.86",
|
|
16
|
+
"node-releases": "^1.0.5"
|
|
17
17
|
},
|
|
18
18
|
"bin": "./cli.js",
|
|
19
19
|
"browser": {
|
|
20
20
|
"./node.js": "./browser.js",
|
|
21
21
|
"path": false
|
|
22
|
+
},
|
|
23
|
+
"husky": {
|
|
24
|
+
"hooks": {
|
|
25
|
+
"pre-commit": [
|
|
26
|
+
"lint-staged"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
22
29
|
}
|
|
23
30
|
}
|