browserslist 4.8.2 → 4.8.6

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,19 @@
1
1
  # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
+ ## 4.8.6
5
+ * Fix `Unknown version 10 of op_mob` error in `mobileToDesktop` option.
6
+
7
+ ## 4.8.5
8
+ * Fix `last N browsers` again after new `caniuse-db` API changes.
9
+
10
+ ## 4.8.4
11
+ * Fix released versions detection for queries like `last N browsers`.
12
+ * Add IE 11 Mobile to `dead` browsers.
13
+
14
+ ## 4.8.3
15
+ * Fix warning message (by Anton Ivanov).
16
+
4
17
  ## 4.8.2
5
18
  * Fix `Cannot convert undefined or null to object` (by Antoine Clausse).
6
19
  * Fix `mobileToDesktop` in `defaults` (by Huáng Jùnliàng).
package/README.md CHANGED
@@ -37,7 +37,7 @@ not IE_Mob 11
37
37
  maintained node versions
38
38
  ```
39
39
 
40
- Developers set versions list in queries like `last 2 version`
40
+ Developers set their version lists using queries like `last 2 version`
41
41
  to be free from updating versions manually.
42
42
  Browserslist will use [`caniuse-lite`] with [Can I Use] data for this queries.
43
43
 
@@ -81,6 +81,8 @@ Browserslist will take queries from tool option,
81
81
 
82
82
  ## Tools
83
83
 
84
+ * [`browserl.ist`](https://browserl.ist/) is an online tool to check
85
+ what browsers will be selected by some query.
84
86
  * [`browserslist-ga`] and [`browserslist-ga-export`] download your website
85
87
  browsers statistics to use it in `> 0.5% in my stats` query.
86
88
  * [`browserslist-useragent-regexp`] compiles Browserslist query to a RegExp
@@ -114,9 +116,9 @@ Browserslist will take queries from tool option,
114
116
  ]
115
117
  ```
116
118
 
117
- * If you want to change the default set of browsers we recommend to combine
119
+ * If you want to change the default set of browsers, we recommend combining
118
120
  `last 2 versions`, `not dead` with a usage number like `> 0.2%`. This is
119
- because `last n versions` on its own does not add popular old versions while
121
+ because `last n versions` on its own does not add popular old versions, while
120
122
  only using a percentage above `0.2%` will in the long run make popular
121
123
  browsers even more popular. We might run into a monopoly and stagnation
122
124
  situation, as we had with Internet Explorer 6. Please use this setting
@@ -535,8 +537,8 @@ These browsers account for 83.1% of all users in custom statistics
535
537
 
536
538
  ## Environment Variables
537
539
 
538
- If some tool use Browserslist inside, you can change browsers settings
539
- by [environment variables]:
540
+ If a tool uses Browserslist inside, you can change the Browserslist settings
541
+ with [environment variables]:
540
542
 
541
543
  * `BROWSERSLIST` with browsers queries.
542
544
 
package/index.js CHANGED
@@ -186,6 +186,21 @@ function cloneData (data) {
186
186
  }
187
187
  }
188
188
 
189
+ function mapVersions (data, map) {
190
+ data.versions = data.versions.map(function (i) {
191
+ return map[i] || i
192
+ })
193
+ data.released = data.versions.map(function (i) {
194
+ return map[i] || i
195
+ })
196
+ var fixedDate = { }
197
+ for (var i in data.releaseDate) {
198
+ fixedDate[map[i] || i] = data.releaseDate[i]
199
+ }
200
+ data.releaseDate = fixedDate
201
+ return data
202
+ }
203
+
189
204
  function byName (name, context) {
190
205
  name = name.toLowerCase()
191
206
  name = browserslist.aliases[name] || name
@@ -196,6 +211,9 @@ function byName (name, context) {
196
211
  } else {
197
212
  var cloned = cloneData(desktop)
198
213
  cloned.name = name
214
+ if (name === 'op_mob') {
215
+ cloned = mapVersions(cloned, { '10.0-10.1': '10' })
216
+ }
199
217
  return cloned
200
218
  }
201
219
  }
@@ -1021,7 +1039,8 @@ var QUERIES = [
1021
1039
  regexp: /^dead$/i,
1022
1040
  select: function (context) {
1023
1041
  var dead = [
1024
- 'ie <= 10', 'ie_mob <= 10',
1042
+ 'ie <= 10',
1043
+ 'ie_mob <= 11',
1025
1044
  'bb <= 10',
1026
1045
  'op_mob <= 12.1',
1027
1046
  'samsung 4'
package/node.js CHANGED
@@ -337,7 +337,7 @@ module.exports = {
337
337
  })
338
338
  console.warn(
339
339
  'Browserslist: caniuse-lite is outdated. ' +
340
- 'Please run next command `' + command + '`'
340
+ 'Please run the following command: `' + command + '`'
341
341
  )
342
342
  }
343
343
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browserslist",
3
- "version": "4.8.2",
3
+ "version": "4.8.6",
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,9 +15,9 @@
15
15
  "license": "MIT",
16
16
  "repository": "browserslist/browserslist",
17
17
  "dependencies": {
18
- "caniuse-lite": "^1.0.30001015",
19
- "electron-to-chromium": "^1.3.322",
20
- "node-releases": "^1.1.42"
18
+ "caniuse-lite": "^1.0.30001023",
19
+ "electron-to-chromium": "^1.3.341",
20
+ "node-releases": "^1.1.47"
21
21
  },
22
22
  "bin": "./cli.js",
23
23
  "browser": {