browserslist 4.5.2 → 4.5.3

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.5.3
5
+ * Fix splitting string to queries.
6
+
4
7
  ## 4.5.2
5
8
  * Show default browsers in CLI on project without config.
6
9
 
package/README.md CHANGED
@@ -556,13 +556,9 @@ To disable the caching altogether, set the `BROWSERSLIST_DISABLE_CACHE`
556
556
  environment variable.
557
557
 
558
558
 
559
- ## Contributors
560
-
561
- <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/0" alt="" width="76" height="90" align="left">
562
- <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/1" alt="" width="76" height="90" align="left">
563
- <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/2" alt="" width="76" height="90" align="left">
564
- <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/3" alt="" width="76" height="90" align="left">
565
- <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/4" alt="" width="76" height="90" align="left">
566
- <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/5" alt="" width="76" height="90" align="left">
567
- <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/6" alt="" width="76" height="90" align="left">
568
- <img src="https://sourcerer.io/fame/ai/browserslist/browserslist/images/7" alt="" width="76" height="90" align="left">
559
+ ## Security Contact
560
+
561
+ To report a security vulnerability, please use the [Tidelift security contact].
562
+ Tidelift will coordinate the fix and disclosure.
563
+
564
+ [Tidelift security contact]: https://tidelift.com/security
package/index.js CHANGED
@@ -364,29 +364,26 @@ function doMatch (string, qs) {
364
364
  var or = /^(?:,\s*|\s+OR\s+)(.*)/i
365
365
  var and = /^\s+AND\s+(.*)/i
366
366
 
367
- return find(
368
- string,
369
- function (parsed, n, max) {
370
- if (and.test(parsed)) {
371
- qs.unshift({ type: QUERY_AND, queryString: parsed.match(and)[1] })
372
- return true
373
- } else if (or.test(parsed)) {
374
- qs.unshift({ type: QUERY_OR, queryString: parsed.match(or)[1] })
375
- return true
376
- } else if (n === max) {
377
- qs.unshift({ type: QUERY_OR, queryString: parsed.trim() })
378
- return true
379
- }
380
- return false
367
+ return find(string, function (parsed, n, max) {
368
+ if (and.test(parsed)) {
369
+ qs.unshift({ type: QUERY_AND, queryString: parsed.match(and)[1] })
370
+ return true
371
+ } else if (or.test(parsed)) {
372
+ qs.unshift({ type: QUERY_OR, queryString: parsed.match(or)[1] })
373
+ return true
374
+ } else if (n === max) {
375
+ qs.unshift({ type: QUERY_OR, queryString: parsed.trim() })
376
+ return true
381
377
  }
382
- )
378
+ return false
379
+ })
383
380
  }
384
381
 
385
382
  function find (string, predicate) {
386
383
  for (var n = 1, max = string.length; n <= max; n++) {
387
384
  var parsed = string.substr(-n, n)
388
385
  if (predicate(parsed, n, max)) {
389
- return string.replace(parsed, '')
386
+ return string.slice(0, -n)
390
387
  }
391
388
  }
392
389
  return ''
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browserslist",
3
- "version": "4.5.2",
3
+ "version": "4.5.3",
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,9 +11,9 @@
11
11
  "license": "MIT",
12
12
  "repository": "browserslist/browserslist",
13
13
  "dependencies": {
14
- "caniuse-lite": "^1.0.30000951",
15
- "electron-to-chromium": "^1.3.116",
16
- "node-releases": "^1.1.11"
14
+ "caniuse-lite": "^1.0.30000955",
15
+ "electron-to-chromium": "^1.3.122",
16
+ "node-releases": "^1.1.12"
17
17
  },
18
18
  "bin": "./cli.js",
19
19
  "browser": {