browserslist 4.8.5 → 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,9 @@
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
+
4
7
  ## 4.8.5
5
8
  * Fix `last N browsers` again after new `caniuse-db` API changes.
6
9
 
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
 
@@ -116,9 +116,9 @@ Browserslist will take queries from tool option,
116
116
  ]
117
117
  ```
118
118
 
119
- * 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
120
120
  `last 2 versions`, `not dead` with a usage number like `> 0.2%`. This is
121
- 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
122
122
  only using a percentage above `0.2%` will in the long run make popular
123
123
  browsers even more popular. We might run into a monopoly and stagnation
124
124
  situation, as we had with Internet Explorer 6. Please use this setting
@@ -537,8 +537,8 @@ These browsers account for 83.1% of all users in custom statistics
537
537
 
538
538
  ## Environment Variables
539
539
 
540
- If some tool use Browserslist inside, you can change browsers settings
541
- by [environment variables]:
540
+ If a tool uses Browserslist inside, you can change the Browserslist settings
541
+ with [environment variables]:
542
542
 
543
543
  * `BROWSERSLIST` with browsers queries.
544
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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browserslist",
3
- "version": "4.8.5",
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.30001022",
19
- "electron-to-chromium": "^1.3.338",
20
- "node-releases": "^1.1.46"
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": {