browserslist 4.16.4 → 4.16.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/README.md +12 -8
- package/index.js +8 -8
- package/node.js +5 -3
- package/package.json +5 -5
- package/update-db.js +3 -0
package/README.md
CHANGED
|
@@ -213,7 +213,7 @@ intersection of all the previous queries:
|
|
|
213
213
|
`last 1 version or chrome > 75 and > 1%` will select
|
|
214
214
|
(`browser last version` or `Chrome since 76`) and `more than 1% marketshare`.
|
|
215
215
|
|
|
216
|
-
There
|
|
216
|
+
There are 3 different ways to combine queries as depicted below. First you start
|
|
217
217
|
with a single query and then we combine the queries to get our final list.
|
|
218
218
|
|
|
219
219
|
Obviously you can *not* start with a `not` combiner, since there is no left-hand
|
|
@@ -235,7 +235,8 @@ You can specify the browser and Node.js versions by queries (case insensitive):
|
|
|
235
235
|
|
|
236
236
|
* `defaults`: Browserslist’s default browsers
|
|
237
237
|
(`> 0.5%, last 2 versions, Firefox ESR, not dead`).
|
|
238
|
-
*
|
|
238
|
+
* By usage statistics:
|
|
239
|
+
* `> 5%`: browsers versions selected by global usage statistics.
|
|
239
240
|
`>=`, `<` and `<=` work too.
|
|
240
241
|
* `> 5% in US`: uses USA usage statistics.
|
|
241
242
|
It accepts [two-letter country code].
|
|
@@ -247,19 +248,22 @@ You can specify the browser and Node.js versions by queries (case insensitive):
|
|
|
247
248
|
* `cover 99.5%`: most popular browsers that provide coverage.
|
|
248
249
|
* `cover 99.5% in US`: same as above, with [two-letter country code].
|
|
249
250
|
* `cover 99.5% in my stats`: uses [custom usage data].
|
|
250
|
-
*
|
|
251
|
-
|
|
252
|
-
`Samsung 4` and `OperaMobile 12.1`.
|
|
253
|
-
* `last 2 versions`: the last 2 versions for *each* browser.
|
|
251
|
+
* Last versions:
|
|
252
|
+
* `last 2 versions`: the last 2 versions for *each* browser.
|
|
254
253
|
* `last 2 Chrome versions`: the last 2 versions of Chrome browser.
|
|
255
254
|
* `last 2 major versions` or `last 2 iOS major versions`:
|
|
256
255
|
all minor/patch releases of last 2 major versions.
|
|
257
|
-
* `
|
|
256
|
+
* `dead`: browsers without official support or updates for 24 months.
|
|
257
|
+
Right now it is `IE 10`, `IE_Mob 11`, `BlackBerry 10`, `BlackBerry 7`,
|
|
258
|
+
`Samsung 4` and `OperaMobile 12.1`.
|
|
259
|
+
* Node.js versions:
|
|
260
|
+
* `node 10` and `node 10.4`: selects latest Node.js `10.x.x`
|
|
258
261
|
or `10.4.x` release.
|
|
259
262
|
* `current node`: Node.js version used by Browserslist right now.
|
|
260
263
|
* `maintained node versions`: all Node.js versions, which are [still maintained]
|
|
261
264
|
by Node.js Foundation.
|
|
262
|
-
*
|
|
265
|
+
* Browsers versions:
|
|
266
|
+
* `iOS 7`: the iOS browser version 7 directly.
|
|
263
267
|
* `Firefox > 20`: versions of Firefox newer than 20.
|
|
264
268
|
`>=`, `<` and `<=` work too. It also works with Node.js.
|
|
265
269
|
* `ie 6-8`: selects an inclusive range of versions.
|
package/index.js
CHANGED
|
@@ -799,7 +799,7 @@ var QUERIES = [
|
|
|
799
799
|
select: sinceQuery
|
|
800
800
|
},
|
|
801
801
|
{
|
|
802
|
-
regexp: /^(>=?|<=?)\s*(\d
|
|
802
|
+
regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%$/,
|
|
803
803
|
select: function (context, sign, popularity) {
|
|
804
804
|
popularity = parseFloat(popularity)
|
|
805
805
|
var usage = browserslist.usage.global
|
|
@@ -824,7 +824,7 @@ var QUERIES = [
|
|
|
824
824
|
}
|
|
825
825
|
},
|
|
826
826
|
{
|
|
827
|
-
regexp: /^(>=?|<=?)\s*(\d
|
|
827
|
+
regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+my\s+stats$/,
|
|
828
828
|
select: function (context, sign, popularity) {
|
|
829
829
|
popularity = parseFloat(popularity)
|
|
830
830
|
if (!context.customUsage) {
|
|
@@ -852,12 +852,12 @@ var QUERIES = [
|
|
|
852
852
|
}
|
|
853
853
|
},
|
|
854
854
|
{
|
|
855
|
-
regexp: /^(>=?|<=?)\s*(\d
|
|
855
|
+
regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+(\S+)\s+stats$/,
|
|
856
856
|
select: function (context, sign, popularity, name) {
|
|
857
857
|
popularity = parseFloat(popularity)
|
|
858
858
|
var stats = env.loadStat(context, name, browserslist.data)
|
|
859
859
|
if (stats) {
|
|
860
|
-
context.customUsage = {
|
|
860
|
+
context.customUsage = {}
|
|
861
861
|
for (var browser in stats) {
|
|
862
862
|
fillUsage(context.customUsage, browser, stats[browser])
|
|
863
863
|
}
|
|
@@ -887,7 +887,7 @@ var QUERIES = [
|
|
|
887
887
|
}
|
|
888
888
|
},
|
|
889
889
|
{
|
|
890
|
-
regexp: /^(>=?|<=?)\s*(\d
|
|
890
|
+
regexp: /^(>=?|<=?)\s*(\d+|\d+\.\d+|\.\d+)%\s+in\s+((alt-)?\w\w)$/,
|
|
891
891
|
select: function (context, sign, popularity, place) {
|
|
892
892
|
popularity = parseFloat(popularity)
|
|
893
893
|
if (place.length === 2) {
|
|
@@ -918,11 +918,11 @@ var QUERIES = [
|
|
|
918
918
|
}
|
|
919
919
|
},
|
|
920
920
|
{
|
|
921
|
-
regexp: /^cover\s+(\d
|
|
921
|
+
regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%$/,
|
|
922
922
|
select: coverQuery
|
|
923
923
|
},
|
|
924
924
|
{
|
|
925
|
-
regexp: /^cover\s+(\d
|
|
925
|
+
regexp: /^cover\s+(\d+|\d+\.\d+|\.\d+)%\s+in\s+(my\s+stats|(alt-)?\w\w)$/,
|
|
926
926
|
select: coverQuery
|
|
927
927
|
},
|
|
928
928
|
{
|
|
@@ -1039,7 +1039,7 @@ var QUERIES = [
|
|
|
1039
1039
|
{
|
|
1040
1040
|
regexp: /^(firefox|ff|fx)\s+esr$/i,
|
|
1041
1041
|
select: function () {
|
|
1042
|
-
return ['firefox 78']
|
|
1042
|
+
return ['firefox 78', 'firefox 91']
|
|
1043
1043
|
}
|
|
1044
1044
|
},
|
|
1045
1045
|
{
|
package/node.js
CHANGED
|
@@ -113,6 +113,9 @@ function latestReleaseTime (agents) {
|
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
function normalizeStats (data, stats) {
|
|
116
|
+
if (!data) {
|
|
117
|
+
data = {}
|
|
118
|
+
}
|
|
116
119
|
if (stats && 'dataByBrowser' in stats) {
|
|
117
120
|
stats = stats.dataByBrowser
|
|
118
121
|
}
|
|
@@ -372,9 +375,8 @@ module.exports = {
|
|
|
372
375
|
if (latest !== 0 && latest < halfYearAgo) {
|
|
373
376
|
console.warn(
|
|
374
377
|
'Browserslist: caniuse-lite is outdated. Please run:\n' +
|
|
375
|
-
'npx browserslist@latest --update-db\n' +
|
|
376
|
-
'
|
|
377
|
-
'Why you should do it regularly:\n' +
|
|
378
|
+
' npx browserslist@latest --update-db\n' +
|
|
379
|
+
' Why you should do it regularly: ' +
|
|
378
380
|
'https://github.com/browserslist/browserslist#browsers-data-updating'
|
|
379
381
|
)
|
|
380
382
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browserslist",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.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",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"repository": "browserslist/browserslist",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"caniuse-lite": "^1.0.
|
|
19
|
-
"colorette": "^1.
|
|
20
|
-
"electron-to-chromium": "^1.3.
|
|
18
|
+
"caniuse-lite": "^1.0.30001251",
|
|
19
|
+
"colorette": "^1.3.0",
|
|
20
|
+
"electron-to-chromium": "^1.3.811",
|
|
21
21
|
"escalade": "^3.1.1",
|
|
22
|
-
"node-releases": "^1.1.
|
|
22
|
+
"node-releases": "^1.1.75"
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
25
25
|
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
package/update-db.js
CHANGED
|
@@ -24,6 +24,7 @@ function detectLockfile () {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
var lockfileNpm = path.join(packageDir, 'package-lock.json')
|
|
27
|
+
var lockfileShrinkwrap = path.join(packageDir, 'npm-shrinkwrap.json')
|
|
27
28
|
var lockfileYarn = path.join(packageDir, 'yarn.lock')
|
|
28
29
|
var lockfilePnpm = path.join(packageDir, 'pnpm-lock.yaml')
|
|
29
30
|
|
|
@@ -33,6 +34,8 @@ function detectLockfile () {
|
|
|
33
34
|
return { mode: 'npm', file: lockfileNpm }
|
|
34
35
|
} else if (fs.existsSync(lockfileYarn)) {
|
|
35
36
|
return { mode: 'yarn', file: lockfileYarn }
|
|
37
|
+
} else if (fs.existsSync(lockfileShrinkwrap)) {
|
|
38
|
+
return { mode: 'npm', file: lockfileShrinkwrap }
|
|
36
39
|
}
|
|
37
40
|
throw new BrowserslistError(
|
|
38
41
|
'No lockfile found. Run "npm install", "yarn install" or "pnpm install"'
|