browserslist 4.21.11 → 4.22.0
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/README.md +2 -2
- package/index.js +7 -6
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -19,7 +19,7 @@ when you add the following to `package.json`:
|
|
|
19
19
|
|
|
20
20
|
```json
|
|
21
21
|
"browserslist": [
|
|
22
|
-
"defaults and supports es6-module",
|
|
22
|
+
"defaults and fully supports es6-module",
|
|
23
23
|
"maintained node versions"
|
|
24
24
|
]
|
|
25
25
|
```
|
|
@@ -29,7 +29,7 @@ Or in `.browserslistrc` config:
|
|
|
29
29
|
```yaml
|
|
30
30
|
# Browsers that we support
|
|
31
31
|
|
|
32
|
-
defaults and supports es6-module
|
|
32
|
+
defaults and fully supports es6-module
|
|
33
33
|
maintained node versions
|
|
34
34
|
```
|
|
35
35
|
|
package/index.js
CHANGED
|
@@ -298,10 +298,10 @@ function filterJumps(list, name, nVersions, context) {
|
|
|
298
298
|
return list.slice(jump - 1 - nVersions)
|
|
299
299
|
}
|
|
300
300
|
|
|
301
|
-
function isSupported(flags) {
|
|
301
|
+
function isSupported(flags, withPartial) {
|
|
302
302
|
return (
|
|
303
303
|
typeof flags === 'string' &&
|
|
304
|
-
(flags.indexOf('y') >= 0 || flags.indexOf('a') >= 0)
|
|
304
|
+
(flags.indexOf('y') >= 0 || (withPartial && flags.indexOf('a') >= 0))
|
|
305
305
|
)
|
|
306
306
|
}
|
|
307
307
|
|
|
@@ -883,10 +883,11 @@ var QUERIES = {
|
|
|
883
883
|
select: coverQuery
|
|
884
884
|
},
|
|
885
885
|
supports: {
|
|
886
|
-
matches: ['feature'],
|
|
887
|
-
regexp: /^supports\s+([\w-]+)$/,
|
|
886
|
+
matches: ['supportType', 'feature'],
|
|
887
|
+
regexp: /^(?:(fully|partially) )?supports\s+([\w-]+)$/,
|
|
888
888
|
select: function (context, node) {
|
|
889
889
|
env.loadFeature(browserslist.cache, node.feature)
|
|
890
|
+
var withPartial = node.supportType !== 'fully'
|
|
890
891
|
var features = browserslist.cache[node.feature]
|
|
891
892
|
var result = []
|
|
892
893
|
for (var name in features) {
|
|
@@ -895,13 +896,13 @@ var QUERIES = {
|
|
|
895
896
|
var checkDesktop =
|
|
896
897
|
context.mobileToDesktop &&
|
|
897
898
|
name in browserslist.desktopNames &&
|
|
898
|
-
isSupported(features[name][data.released.slice(-1)[0]])
|
|
899
|
+
isSupported(features[name][data.released.slice(-1)[0]], withPartial)
|
|
899
900
|
data.versions.forEach(function (version) {
|
|
900
901
|
var flags = features[name][version]
|
|
901
902
|
if (flags === undefined && checkDesktop) {
|
|
902
903
|
flags = features[browserslist.desktopNames[name]][version]
|
|
903
904
|
}
|
|
904
|
-
if (isSupported(flags)) {
|
|
905
|
+
if (isSupported(flags, withPartial)) {
|
|
905
906
|
result.push(name + ' ' + version)
|
|
906
907
|
}
|
|
907
908
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browserslist",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.22.0",
|
|
4
4
|
"description": "Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"caniuse",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"repository": "browserslist/browserslist",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"caniuse-lite": "^1.0.
|
|
29
|
-
"electron-to-chromium": "^1.4.
|
|
28
|
+
"caniuse-lite": "^1.0.30001539",
|
|
29
|
+
"electron-to-chromium": "^1.4.530",
|
|
30
30
|
"node-releases": "^2.0.13",
|
|
31
31
|
"update-browserslist-db": "^1.0.13"
|
|
32
32
|
},
|