browserslist 4.28.0 → 4.28.2
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/LICENSE +1 -1
- package/README.md +16 -17
- package/index.js +18 -6
- package/package.json +16 -16
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright 2014 Andrey Sitnik <andrey@sitnik.
|
|
3
|
+
Copyright 2014 Andrey Sitnik <andrey@sitnik.es> and other contributors
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
package/README.md
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
The config to share target browsers and Node.js versions between different
|
|
7
7
|
front-end tools. It is used in:
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
- [Autoprefixer]
|
|
10
|
+
- [Babel]
|
|
11
|
+
- [postcss-preset-env]
|
|
12
|
+
- [eslint-plugin-compat]
|
|
13
|
+
- [stylelint-no-unsupported-browser-features]
|
|
14
|
+
- [postcss-normalize]
|
|
15
|
+
- [obsolete-webpack-plugin]
|
|
16
16
|
|
|
17
17
|
All tools will find target browsers automatically,
|
|
18
18
|
when you add the following to `package.json`:
|
|
@@ -50,16 +50,15 @@ You can check how config works at our playground: [`browsersl.ist`](https://brow
|
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
[stylelint-no-unsupported-browser-features]: https://github.com/ismay/stylelint-no-unsupported-browser-features
|
|
53
|
-
[obsolete-webpack-plugin]:
|
|
54
|
-
[eslint-plugin-compat]:
|
|
55
|
-
[
|
|
56
|
-
[postcss-
|
|
57
|
-
[
|
|
58
|
-
[`
|
|
59
|
-
[
|
|
60
|
-
[
|
|
61
|
-
[
|
|
62
|
-
[Babel]: https://github.com/babel/babel/tree/master/packages/babel-preset-env
|
|
53
|
+
[obsolete-webpack-plugin]: https://github.com/ElemeFE/obsolete-webpack-plugin
|
|
54
|
+
[eslint-plugin-compat]: https://github.com/amilajack/eslint-plugin-compat
|
|
55
|
+
[postcss-preset-env]: https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env
|
|
56
|
+
[postcss-normalize]: https://github.com/csstools/postcss-normalize
|
|
57
|
+
[`browsersl.ist`]: https://browsersl.ist/
|
|
58
|
+
[`caniuse-lite`]: https://github.com/ben-eb/caniuse-lite
|
|
59
|
+
[Autoprefixer]: https://github.com/postcss/autoprefixer
|
|
60
|
+
[Can I Use]: https://caniuse.com/
|
|
61
|
+
[Babel]: https://github.com/babel/babel/tree/master/packages/babel-preset-env
|
|
63
62
|
|
|
64
63
|
## Docs
|
|
65
64
|
Read full docs **[here](https://github.com/browserslist/browserslist#readme)**.
|
package/index.js
CHANGED
|
@@ -255,10 +255,14 @@ function normalizeAndroidVersions(androidVersions, chromeVersions) {
|
|
|
255
255
|
.concat(chromeVersions.slice(iFirstEvergreen))
|
|
256
256
|
}
|
|
257
257
|
|
|
258
|
+
var DANGEROUS_KEYS = ['__proto__', 'constructor', 'prototype']
|
|
259
|
+
|
|
258
260
|
function copyObject(obj) {
|
|
259
261
|
var copy = {}
|
|
260
262
|
for (var key in obj) {
|
|
261
|
-
|
|
263
|
+
if (DANGEROUS_KEYS.indexOf(key) === -1) {
|
|
264
|
+
copy[key] = obj[key]
|
|
265
|
+
}
|
|
262
266
|
}
|
|
263
267
|
return copy
|
|
264
268
|
}
|
|
@@ -834,25 +838,29 @@ var QUERIES = {
|
|
|
834
838
|
baselineVersions = bbm.getCompatibleVersions({
|
|
835
839
|
targetYear: node.year,
|
|
836
840
|
includeDownstreamBrowsers: includeDownstream,
|
|
837
|
-
includeKaiOS: includeKaiOS
|
|
841
|
+
includeKaiOS: includeKaiOS,
|
|
842
|
+
suppressWarnings: true
|
|
838
843
|
})
|
|
839
844
|
} else if (node.date) {
|
|
840
845
|
baselineVersions = bbm.getCompatibleVersions({
|
|
841
846
|
widelyAvailableOnDate: node.date,
|
|
842
847
|
includeDownstreamBrowsers: includeDownstream,
|
|
843
|
-
includeKaiOS: includeKaiOS
|
|
848
|
+
includeKaiOS: includeKaiOS,
|
|
849
|
+
suppressWarnings: true
|
|
844
850
|
})
|
|
845
851
|
} else if (node.availability === 'newly') {
|
|
846
852
|
var future30months = new Date().setMonth(new Date().getMonth() + 30)
|
|
847
853
|
baselineVersions = bbm.getCompatibleVersions({
|
|
848
854
|
widelyAvailableOnDate: future30months,
|
|
849
855
|
includeDownstreamBrowsers: includeDownstream,
|
|
850
|
-
includeKaiOS: includeKaiOS
|
|
856
|
+
includeKaiOS: includeKaiOS,
|
|
857
|
+
suppressWarnings: true
|
|
851
858
|
})
|
|
852
859
|
} else {
|
|
853
860
|
baselineVersions = bbm.getCompatibleVersions({
|
|
854
861
|
includeDownstreamBrowsers: includeDownstream,
|
|
855
|
-
includeKaiOS: includeKaiOS
|
|
862
|
+
includeKaiOS: includeKaiOS,
|
|
863
|
+
suppressWarnings: true
|
|
856
864
|
})
|
|
857
865
|
}
|
|
858
866
|
return resolve(bbmTransform(baselineVersions), context)
|
|
@@ -1116,7 +1124,11 @@ var QUERIES = {
|
|
|
1116
1124
|
var data = checkName(node.browser, context)
|
|
1117
1125
|
var alias = browserslist.versionAliases[data.name][version.toLowerCase()]
|
|
1118
1126
|
if (alias) version = alias
|
|
1119
|
-
if (!/[\d.]+/.test(version))
|
|
1127
|
+
if (!/[\d.]+/.test(version)) {
|
|
1128
|
+
throw new BrowserslistError(
|
|
1129
|
+
'Unknown version ' + version + ' of ' + node.browser
|
|
1130
|
+
)
|
|
1131
|
+
}
|
|
1120
1132
|
return data.released
|
|
1121
1133
|
.filter(generateFilter(node.sign, version))
|
|
1122
1134
|
.map(function (v) {
|
package/package.json
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browserslist",
|
|
3
|
-
"version": "4.28.
|
|
3
|
+
"version": "4.28.2",
|
|
4
4
|
"description": "Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"caniuse",
|
|
7
6
|
"browsers",
|
|
7
|
+
"caniuse",
|
|
8
8
|
"target"
|
|
9
9
|
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"author": "Andrey Sitnik <andrey@sitnik.es>",
|
|
12
|
+
"repository": "browserslist/browserslist",
|
|
10
13
|
"funding": [
|
|
11
14
|
{
|
|
12
15
|
"type": "opencollective",
|
|
@@ -21,25 +24,22 @@
|
|
|
21
24
|
"url": "https://github.com/sponsors/ai"
|
|
22
25
|
}
|
|
23
26
|
],
|
|
24
|
-
"author": "Andrey Sitnik <andrey@sitnik.ru>",
|
|
25
|
-
"license": "MIT",
|
|
26
|
-
"repository": "browserslist/browserslist",
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"baseline-browser-mapping": "^2.8.25",
|
|
29
|
-
"caniuse-lite": "^1.0.30001754",
|
|
30
|
-
"electron-to-chromium": "^1.5.249",
|
|
31
|
-
"node-releases": "^2.0.27",
|
|
32
|
-
"update-browserslist-db": "^1.1.4"
|
|
33
|
-
},
|
|
34
|
-
"engines": {
|
|
35
|
-
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
|
36
|
-
},
|
|
37
27
|
"bin": {
|
|
38
28
|
"browserslist": "cli.js"
|
|
39
29
|
},
|
|
40
|
-
"types": "./index.d.ts",
|
|
41
30
|
"browser": {
|
|
42
31
|
"./node.js": "./browser.js",
|
|
43
32
|
"path": false
|
|
33
|
+
},
|
|
34
|
+
"types": "./index.d.ts",
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"baseline-browser-mapping": "^2.10.12",
|
|
37
|
+
"caniuse-lite": "^1.0.30001782",
|
|
38
|
+
"electron-to-chromium": "^1.5.328",
|
|
39
|
+
"node-releases": "^2.0.36",
|
|
40
|
+
"update-browserslist-db": "^1.2.3"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
|
44
44
|
}
|
|
45
45
|
}
|