browserslist 4.0.0 → 4.1.1

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 CHANGED
@@ -1,6 +1,21 @@
1
1
  # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
+ ## 4.1.1
5
+ * Update Firefox ESR versions.
6
+
7
+ ## 4.1
8
+ * Add `current node` query.
9
+ * Add contributors widget to docs (by Sergey Surkov).
10
+
11
+ ## 4.0.2
12
+ * Fix new `node-releases` support (by Sergey Rubanov).
13
+ * Fix error text (by Josh Smith).
14
+
15
+ ## 4.0.1
16
+ * Reduce npm package size.
17
+ * Fix docs.
18
+
4
19
  ## 4.0.0 “Erinaceus amurensis”
5
20
  * Add `node X` and `maintained node versions` queries (by Pavel Vostrikov).
6
21
  * Remove Node.js 4 support.
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Browserslist [![Cult Of Martians][cult-img]][cult]
2
2
 
3
- <img align="right" width="120" height="120"
4
- src="./logo.svg" alt="Browserslist logo by Anton Lovchikov">
3
+ <img width="120" height="120" alt="Browserslist logo by Anton Lovchikov"
4
+ src="http://browserslist.github.io/browserslist/logo.svg" align="right">
5
5
 
6
6
  The config to share target browsers and Node.js versions between different
7
7
  front-end tools. It is used in:
@@ -137,6 +137,7 @@ You can specify the browser and Node.js versions by queries (case insensitive):
137
137
  by Node.js Foundation.
138
138
  * `node 10` and `node 10.4`: selects latest Node.js `10.x.x`
139
139
  or `10.4.x` release.
140
+ * `current node`: Node.js version used by Browserslist right now.
140
141
  * `extends browserslist-config-mycompany`: take queries from
141
142
  `browserslist-config-mycompany` npm package.
142
143
  * `ie 6-8`: selects an inclusive range of versions.
@@ -528,3 +529,15 @@ browserslist.clearCaches();
528
529
 
529
530
  To disable the caching altogether, set the `BROWSERSLIST_DISABLE_CACHE`
530
531
  environment variable.
532
+
533
+
534
+ ## Contributors
535
+
536
+ <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/0" alt="" width="76" height="90" align="left">
537
+ <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/1" alt="" width="76" height="90" align="left">
538
+ <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/2" alt="" width="76" height="90" align="left">
539
+ <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/3" alt="" width="76" height="90" align="left">
540
+ <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/4" alt="" width="76" height="90" align="left">
541
+ <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/5" alt="" width="76" height="90" align="left">
542
+ <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/6" alt="" width="76" height="90" align="left">
543
+ <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/7" alt="" width="76" height="90" align="left">
package/browser.js CHANGED
@@ -25,6 +25,10 @@ module.exports = {
25
25
  'in client-side build of Browserslist')
26
26
  },
27
27
 
28
+ currentNode: function currentNode (resolve, context) {
29
+ return resolve(['maintained node versions'], context)[0]
30
+ },
31
+
28
32
  parseConfig: noop,
29
33
 
30
34
  readConfig: noop,
package/index.js CHANGED
@@ -650,7 +650,7 @@ var QUERIES = [
650
650
  {
651
651
  regexp: /^(firefox|ff|fx)\s+esr$/i,
652
652
  select: function () {
653
- return ['firefox 52', 'firefox 60']
653
+ return ['firefox 60']
654
654
  }
655
655
  },
656
656
  {
@@ -690,12 +690,19 @@ var QUERIES = [
690
690
  return ['node ' + matched[matched.length - 1].version]
691
691
  }
692
692
  },
693
+ {
694
+ regexp: /^current\s+node$/i,
695
+ select: function (context) {
696
+ return [env.currentNode(resolve, context)]
697
+ }
698
+ },
693
699
  {
694
700
  regexp: /^maintained\s+node\s+versions$/i,
695
701
  select: function (context) {
696
702
  var now = Date.now()
697
703
  var queries = Object.keys(jsEOL).filter(function (key) {
698
- return now < Date.parse(jsEOL[key].end)
704
+ return now < Date.parse(jsEOL[key].end) &&
705
+ now > Date.parse(jsEOL[key].start)
699
706
  }).map(function (key) {
700
707
  return 'node ' + key.slice(1)
701
708
  })
package/node.js CHANGED
@@ -202,7 +202,7 @@ module.exports = {
202
202
  sections.forEach(function (section) {
203
203
  if (result[section]) {
204
204
  throw new BrowserslistError(
205
- 'Dublicate section ' + section + ' in Browserslist config')
205
+ 'Duplicate section ' + section + ' in Browserslist config')
206
206
  }
207
207
  result[section] = []
208
208
  })
@@ -296,5 +296,9 @@ module.exports = {
296
296
  'Browserslist: caniuse-lite is outdated. ' +
297
297
  'Please run next command `' + command + ' caniuse-lite browserslist`')
298
298
  }
299
+ },
300
+
301
+ currentNode: function currentNode () {
302
+ return 'node ' + process.versions.node
299
303
  }
300
304
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browserslist",
3
- "version": "4.0.0",
3
+ "version": "4.1.1",
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,42 +11,13 @@
11
11
  "license": "MIT",
12
12
  "repository": "browserslist/browserslist",
13
13
  "dependencies": {
14
- "caniuse-lite": "^1.0.30000859",
15
- "electron-to-chromium": "^1.3.50",
16
- "node-releases": "^1.0.0-alpha.10"
14
+ "caniuse-lite": "^1.0.30000884",
15
+ "electron-to-chromium": "^1.3.62",
16
+ "node-releases": "^1.0.0-alpha.11"
17
17
  },
18
18
  "bin": "./cli.js",
19
- "devDependencies": {
20
- "cross-spawn": "^6.0.5",
21
- "eslint": "^5.0.1",
22
- "eslint-ci": "^0.1.1",
23
- "eslint-config-logux": "^23.0.2",
24
- "eslint-config-standard": "^11.0.0",
25
- "eslint-plugin-es5": "^1.3.1",
26
- "eslint-plugin-import": "^2.13.0",
27
- "eslint-plugin-jest": "^21.17.0",
28
- "eslint-plugin-node": "^6.0.1",
29
- "eslint-plugin-promise": "^3.8.0",
30
- "eslint-plugin-security": "^1.4.0",
31
- "eslint-plugin-standard": "^3.1.0",
32
- "fs-extra": "^6.0.1",
33
- "jest": "^23.2.0",
34
- "lint-staged": "^7.2.0",
35
- "pre-commit": "^1.1.3",
36
- "size-limit": "^0.18.3",
37
- "yaspeller-ci": "^1.0.0"
38
- },
39
- "scripts": {
40
- "lint-staged": "lint-staged",
41
- "spellcheck": "yaspeller-ci README.md CHANGELOG.md",
42
- "lint": "eslint-ci *.js test/*.js benchmark/*.js",
43
- "test": "jest --coverage && yarn lint && yarn spellcheck && size-limit"
44
- },
45
19
  "browser": {
46
20
  "./node.js": "./browser.js",
47
21
  "path": false
48
- },
49
- "pre-commit": [
50
- "lint-staged"
51
- ]
22
+ }
52
23
  }