browserslist 4.21.2 → 4.21.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  # Browserslist [![Cult Of Martians][cult-img]][cult]
2
2
 
3
- <img width="120" height="120" alt="Browserslist logo by Anton Lovchikov"
4
- src="https://browserslist.github.io/browserslist/logo.svg" align="right">
3
+ <img width="120" height="120" alt="Browserslist logo by Anton Popov"
4
+ src="https://browsersl.ist/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:
@@ -19,8 +19,7 @@ when you add the following to `package.json`:
19
19
 
20
20
  ```json
21
21
  "browserslist": [
22
- "defaults",
23
- "not IE 11",
22
+ "defaults and supports es6-module",
24
23
  "maintained node versions"
25
24
  ]
26
25
  ```
@@ -30,8 +29,7 @@ Or in `.browserslistrc` config:
30
29
  ```yaml
31
30
  # Browsers that we support
32
31
 
33
- defaults
34
- not IE 11
32
+ defaults and supports es6-module
35
33
  maintained node versions
36
34
  ```
37
35
 
@@ -39,28 +37,39 @@ Developers set their version lists using queries like `last 2 versions`
39
37
  to be free from updating versions manually.
40
38
  Browserslist will use [`caniuse-lite`] with [Can I Use] data for this queries.
41
39
 
42
- Browserslist will take queries from tool option,
43
- `browserslist` config, `.browserslistrc` config,
44
- `browserslist` section in `package.json` or environment variables.
40
+ You can check how config works at our playground: [`browsersl.ist`](https://browsersl.ist/)
45
41
 
46
- [cult-img]: https://cultofmartians.com/assets/badges/badge.svg
47
- [cult]: https://cultofmartians.com/done.html
48
-
49
- <a href="https://evilmartians.com/?utm_source=browserslist">
50
- <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
51
- alt="Sponsored by Evil Martians" width="236" height="54">
42
+ <a href="https://browsersl.ist/">
43
+ <img src="/img/screenshot.webp" alt="browsersl.ist website">
52
44
  </a>
53
45
 
46
+ <br>
47
+ <br>
48
+ <div align="center">
49
+ <a href="https://evilmartians.com/?utm_source=browserslist">
50
+ <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg"
51
+ alt="Sponsored by Evil Martians" width="236" height="54">
52
+ </a>
53
+
54
+ <a href="https://cube.dev/?ref=eco-browserslist-github">
55
+ <img src="https://user-images.githubusercontent.com/986756/154330861-d79ab8ec-aacb-4af8-9e17-1b28f1eccb01.svg"
56
+ alt="Supported by Cube" width="227" height="46">
57
+ </a>
58
+ </div>
59
+
54
60
  [stylelint-no-unsupported-browser-features]: https://github.com/ismay/stylelint-no-unsupported-browser-features
61
+ [obsolete-webpack-plugin]: https://github.com/ElemeFE/obsolete-webpack-plugin
55
62
  [eslint-plugin-compat]: https://github.com/amilajack/eslint-plugin-compat
56
63
  [Browserslist Example]: https://github.com/browserslist/browserslist-example
57
- [postcss-preset-env]: https://github.com/jonathantneal/postcss-preset-env
58
- [postcss-normalize]: https://github.com/jonathantneal/postcss-normalize
64
+ [postcss-preset-env]: https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env
65
+ [postcss-normalize]: https://github.com/csstools/postcss-normalize
66
+ [`browsersl.ist`]: https://browsersl.ist/
59
67
  [`caniuse-lite`]: https://github.com/ben-eb/caniuse-lite
60
68
  [Autoprefixer]: https://github.com/postcss/autoprefixer
61
69
  [Can I Use]: https://caniuse.com/
62
70
  [Babel]: https://github.com/babel/babel/tree/master/packages/babel-preset-env
63
- [obsolete-webpack-plugin]: https://github.com/ElemeFE/obsolete-webpack-plugin
71
+ [cult-img]: https://cultofmartians.com/assets/badges/badge.svg
72
+ [cult]: https://cultofmartians.com/done.html
64
73
 
65
74
  ## Docs
66
75
  Read **[full docs](https://github.com/browserslist/browserslist#readme)** on GitHub.
package/index.d.ts CHANGED
@@ -45,7 +45,7 @@ declare namespace browserslist {
45
45
  */
46
46
  ignoreUnknownVersions?: boolean
47
47
  /**
48
- * Throw a error if env is not found.
48
+ * Throw an error if env is not found.
49
49
  */
50
50
  throwOnMissing?: boolean
51
51
  /**
package/index.js CHANGED
@@ -992,7 +992,7 @@ var QUERIES = {
992
992
  matches: [],
993
993
  regexp: /^(firefox|ff|fx)\s+esr$/i,
994
994
  select: function () {
995
- return ['firefox 91', 'firefox 102']
995
+ return ['firefox 102']
996
996
  }
997
997
  },
998
998
  opera_mini_all: {
package/node.js CHANGED
@@ -243,7 +243,12 @@ module.exports = {
243
243
  loadCountry: function loadCountry(usage, country, data) {
244
244
  var code = country.replace(/[^\w-]/g, '')
245
245
  if (!usage[code]) {
246
- var compressed = require('caniuse-lite/data/regions/' + code + '.js')
246
+ var compressed
247
+ try {
248
+ compressed = require('caniuse-lite/data/regions/' + code + '.js')
249
+ } catch (e) {
250
+ throw new BrowserslistError("Unknown region name `" + code + "`.")
251
+ }
247
252
  var usageData = region(compressed)
248
253
  normalizeUsageData(usageData, data)
249
254
  usage[country] = {}
@@ -258,8 +263,12 @@ module.exports = {
258
263
  loadFeature: function loadFeature(features, name) {
259
264
  name = name.replace(/[^\w-]/g, '')
260
265
  if (features[name]) return
261
-
262
- var compressed = require('caniuse-lite/data/features/' + name + '.js')
266
+ var compressed
267
+ try {
268
+ compressed = require('caniuse-lite/data/features/' + name + '.js')
269
+ } catch (e) {
270
+ throw new BrowserslistError("Unknown feature name `" + name + "`.")
271
+ }
263
272
  var stats = feature(compressed).stats
264
273
  features[name] = {}
265
274
  for (var i in stats) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browserslist",
3
- "version": "4.21.2",
3
+ "version": "4.21.4",
4
4
  "description": "Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset",
5
5
  "keywords": [
6
6
  "caniuse",
@@ -21,10 +21,10 @@
21
21
  "license": "MIT",
22
22
  "repository": "browserslist/browserslist",
23
23
  "dependencies": {
24
- "caniuse-lite": "^1.0.30001366",
25
- "electron-to-chromium": "^1.4.188",
24
+ "caniuse-lite": "^1.0.30001400",
25
+ "electron-to-chromium": "^1.4.251",
26
26
  "node-releases": "^2.0.6",
27
- "update-browserslist-db": "^1.0.4"
27
+ "update-browserslist-db": "^1.0.9"
28
28
  },
29
29
  "engines": {
30
30
  "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"