browserslist 3.2.7 → 3.2.8
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 +4 -0
- package/README.md +6 -3
- package/cli.js +2 -2
- package/index.js +5 -4
- package/package.json +8 -33
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -70,14 +70,17 @@ You can test Browserslist queries in [online demo].
|
|
|
70
70
|
to use it in `> 0.5% in my stats` query.
|
|
71
71
|
* [`browserslist-useragent`] checks browser by user agent string
|
|
72
72
|
to match Browserslist target browsers query.
|
|
73
|
+
* [`browserslist-useragent-ruby`] is a Ruby library to checks browser
|
|
74
|
+
by user agent string to match Browserslist.
|
|
73
75
|
* [`caniuse-api`] returns browsers which support some specific feature.
|
|
74
76
|
* Run `npx browserslist` in your project directory to see project’s
|
|
75
77
|
target browsers. This CLI tool is built-in and available in any project
|
|
76
78
|
with Autoprefixer.
|
|
77
79
|
|
|
78
|
-
[`browserslist-useragent`]: https://github.com/
|
|
79
|
-
[`browserslist-
|
|
80
|
-
[`
|
|
80
|
+
[`browserslist-useragent-ruby`]: https://github.com/browserslist/browserslist-useragent-ruby
|
|
81
|
+
[`browserslist-useragent`]: https://github.com/pastelsky/browserslist-useragent
|
|
82
|
+
[`browserslist-ga`]: https://github.com/browserslist/browserslist-ga
|
|
83
|
+
[`caniuse-api`]: https://github.com/Nyalab/caniuse-api
|
|
81
84
|
|
|
82
85
|
|
|
83
86
|
## Queries
|
package/cli.js
CHANGED
|
@@ -38,7 +38,7 @@ if (isArg('--help') || isArg('-h')) {
|
|
|
38
38
|
|
|
39
39
|
for (var i = 0; i < args.length; i++) {
|
|
40
40
|
if (args[i][0] !== '-') {
|
|
41
|
-
queries = args[i].replace(/^['
|
|
41
|
+
queries = args[i].replace(/^["']|["']$/g, '')
|
|
42
42
|
continue
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -46,7 +46,7 @@ if (isArg('--help') || isArg('-h')) {
|
|
|
46
46
|
var name = arg[0]
|
|
47
47
|
var value = arg[1]
|
|
48
48
|
|
|
49
|
-
if (value) value = value.replace(/^['
|
|
49
|
+
if (value) value = value.replace(/^["']|["']$/g, '')
|
|
50
50
|
|
|
51
51
|
if (name === '--config' || name === '-b') {
|
|
52
52
|
opts.config = value
|
package/index.js
CHANGED
|
@@ -140,7 +140,7 @@ function resolve (queries, context) {
|
|
|
140
140
|
var array = type.select.apply(browserslist, args)
|
|
141
141
|
if (isExclude) {
|
|
142
142
|
array = array.concat(array.map(function (j) {
|
|
143
|
-
return j.replace(/\s
|
|
143
|
+
return j.replace(/\s\S+/, ' 0')
|
|
144
144
|
}))
|
|
145
145
|
return result.filter(function (j) {
|
|
146
146
|
return array.indexOf(j) === -1
|
|
@@ -332,7 +332,7 @@ browserslist.coverage = function (browsers, stats) {
|
|
|
332
332
|
return browsers.reduce(function (all, i) {
|
|
333
333
|
var usage = data[i]
|
|
334
334
|
if (usage === undefined) {
|
|
335
|
-
usage = data[i.replace(/
|
|
335
|
+
usage = data[i.replace(/ \S+$/, ' 0')]
|
|
336
336
|
}
|
|
337
337
|
return all + (usage || 0)
|
|
338
338
|
}, 0)
|
|
@@ -709,8 +709,9 @@ var QUERIES = [
|
|
|
709
709
|
},
|
|
710
710
|
{
|
|
711
711
|
regexp: /^dead$/i,
|
|
712
|
-
select: function () {
|
|
713
|
-
|
|
712
|
+
select: function (context) {
|
|
713
|
+
var dead = ['ie <= 10', 'ie_mob <= 10', 'bb <= 10', 'op_mob <= 12.1']
|
|
714
|
+
return resolve(dead, context)
|
|
714
715
|
}
|
|
715
716
|
},
|
|
716
717
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browserslist",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.8",
|
|
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,45 +11,30 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"repository": "browserslist/browserslist",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"caniuse-lite": "^1.0.
|
|
15
|
-
"electron-to-chromium": "^1.3.
|
|
14
|
+
"caniuse-lite": "^1.0.30000844",
|
|
15
|
+
"electron-to-chromium": "^1.3.47"
|
|
16
16
|
},
|
|
17
17
|
"bin": "./cli.js",
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"cross-spawn": "^6.0.5",
|
|
20
20
|
"eslint": "^4.19.1",
|
|
21
21
|
"eslint-ci": "^0.1.1",
|
|
22
|
-
"eslint-config-logux": "^
|
|
22
|
+
"eslint-config-logux": "^22.1.0",
|
|
23
23
|
"eslint-config-standard": "^11.0.0",
|
|
24
24
|
"eslint-plugin-es5": "^1.3.1",
|
|
25
|
-
"eslint-plugin-import": "^2.
|
|
25
|
+
"eslint-plugin-import": "^2.12.0",
|
|
26
26
|
"eslint-plugin-jest": "^21.15.1",
|
|
27
27
|
"eslint-plugin-node": "^6.0.1",
|
|
28
28
|
"eslint-plugin-promise": "^3.7.0",
|
|
29
29
|
"eslint-plugin-security": "^1.4.0",
|
|
30
30
|
"eslint-plugin-standard": "^3.1.0",
|
|
31
31
|
"fs-extra": "^5.0.0",
|
|
32
|
-
"jest": "^22.4.
|
|
33
|
-
"lint-staged": "^7.
|
|
32
|
+
"jest": "^22.4.4",
|
|
33
|
+
"lint-staged": "^7.1.2",
|
|
34
34
|
"pre-commit": "^1.1.3",
|
|
35
|
-
"size-limit": "^0.
|
|
35
|
+
"size-limit": "^0.18.0",
|
|
36
36
|
"yaspeller-ci": "^1.0.0"
|
|
37
37
|
},
|
|
38
|
-
"eslintConfig": {
|
|
39
|
-
"extends": "eslint-config-logux/browser",
|
|
40
|
-
"rules": {
|
|
41
|
-
"security/detect-unsafe-regex": "off",
|
|
42
|
-
"global-require": "off"
|
|
43
|
-
},
|
|
44
|
-
"overrides": {
|
|
45
|
-
"files": [
|
|
46
|
-
"*.test.js"
|
|
47
|
-
],
|
|
48
|
-
"rules": {
|
|
49
|
-
"es5/no-arrow-functions": "off"
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
38
|
"jest": {
|
|
54
39
|
"testEnvironment": "node",
|
|
55
40
|
"coverageThreshold": {
|
|
@@ -61,22 +46,12 @@
|
|
|
61
46
|
"<rootDir>/test/fixtures"
|
|
62
47
|
]
|
|
63
48
|
},
|
|
64
|
-
"size-limit": [
|
|
65
|
-
{
|
|
66
|
-
"path": "index.js",
|
|
67
|
-
"limit": "7.2 KB"
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
49
|
"scripts": {
|
|
71
50
|
"lint-staged": "lint-staged",
|
|
72
51
|
"spellcheck": "yaspeller-ci README.md CHANGELOG.md",
|
|
73
52
|
"lint": "eslint-ci *.js test/*.js benchmark/*.js",
|
|
74
53
|
"test": "jest --coverage && yarn lint && yarn spellcheck && size-limit"
|
|
75
54
|
},
|
|
76
|
-
"lint-staged": {
|
|
77
|
-
"*.md": "yaspeller-ci",
|
|
78
|
-
"*.js": "eslint"
|
|
79
|
-
},
|
|
80
55
|
"browser": {
|
|
81
56
|
"./node.js": "./browser.js",
|
|
82
57
|
"path": false
|