From 06823fbf1c2e763a5bf76c3990ca98fbbcd98691 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Tue, 14 May 2024 14:05:49 +0800 Subject: updated node_modules --- node_modules/browserslist/README.md | 8 +------- node_modules/browserslist/index.d.ts | 1 + node_modules/browserslist/index.js | 2 +- node_modules/browserslist/node.js | 12 +++++++++++- node_modules/browserslist/package.json | 6 +++--- 5 files changed, 17 insertions(+), 12 deletions(-) (limited to 'node_modules/browserslist') diff --git a/node_modules/browserslist/README.md b/node_modules/browserslist/README.md index abac4aae..f31bd2cb 100644 --- a/node_modules/browserslist/README.md +++ b/node_modules/browserslist/README.md @@ -46,13 +46,7 @@ You can check how config works at our playground: [`browsersl.ist`](https://brow

- - Sponsored by Evil Martians -    - Supported by Cube - + Sponsored by Evil Martians  Supported by Cube
[stylelint-no-unsupported-browser-features]: https://github.com/ismay/stylelint-no-unsupported-browser-features diff --git a/node_modules/browserslist/index.d.ts b/node_modules/browserslist/index.d.ts index 7f8e7605..e47c5cfe 100644 --- a/node_modules/browserslist/index.d.ts +++ b/node_modules/browserslist/index.d.ts @@ -193,6 +193,7 @@ declare global { BROWSERSLIST_ENV?: string BROWSERSLIST_IGNORE_OLD_DATA?: string BROWSERSLIST_STATS?: string + BROWSERSLIST_ROOT_PATH?: string } } } diff --git a/node_modules/browserslist/index.js b/node_modules/browserslist/index.js index 6718031a..d2fd7d1d 100644 --- a/node_modules/browserslist/index.js +++ b/node_modules/browserslist/index.js @@ -893,7 +893,7 @@ var QUERIES = { }, supports: { matches: ['supportType', 'feature'], - regexp: /^(?:(fully|partially) )?supports\s+([\w-]+)$/, + regexp: /^(?:(fully|partially)\s+)?supports\s+([\w-]+)$/, select: function (context, node) { env.loadFeature(browserslist.cache, node.feature) var withPartial = node.supportType !== 'fully' diff --git a/node_modules/browserslist/node.js b/node_modules/browserslist/node.js index 100ded66..a935371d 100644 --- a/node_modules/browserslist/node.js +++ b/node_modules/browserslist/node.js @@ -7,7 +7,7 @@ var BrowserslistError = require('./error') var IS_SECTION = /^\s*\[(.+)]\s*$/ var CONFIG_PATTERN = /^browserslist-config-/ -var SCOPED_CONFIG__PATTERN = /@[^/]+\/browserslist-config(-|$|\/)/ +var SCOPED_CONFIG__PATTERN = /@[^/]+(?:\/[^/]+)?\/browserslist-config(?:-|$|\/)/ var TIME_TO_UPDATE_CANIUSE = 6 * 30 * 24 * 60 * 60 * 1000 var FORMAT = 'Browserslist config should be a string or an array ' + @@ -50,12 +50,22 @@ function eachParent(file, callback) { var dir = isFile(file) ? path.dirname(file) : file var loc = path.resolve(dir) do { + if (!pathInRoot(loc)) break; var result = callback(loc) if (typeof result !== 'undefined') return result } while (loc !== (loc = path.dirname(loc))) return undefined } +function pathInRoot(p) { + if (!process.env.BROWSERSLIST_ROOT_PATH) return true + var rootPath = path.resolve(process.env.BROWSERSLIST_ROOT_PATH); + if (path.relative(rootPath, p).substring(0,2) === '..') { + return false; + } + return true +} + function check(section) { if (Array.isArray(section)) { for (var i = 0; i < section.length; i++) { diff --git a/node_modules/browserslist/package.json b/node_modules/browserslist/package.json index 55225bea..b8e17688 100644 --- a/node_modules/browserslist/package.json +++ b/node_modules/browserslist/package.json @@ -1,6 +1,6 @@ { "name": "browserslist", - "version": "4.22.2", + "version": "4.23.0", "description": "Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset", "keywords": [ "caniuse", @@ -25,8 +25,8 @@ "license": "MIT", "repository": "browserslist/browserslist", "dependencies": { - "caniuse-lite": "^1.0.30001565", - "electron-to-chromium": "^1.4.601", + "caniuse-lite": "^1.0.30001587", + "electron-to-chromium": "^1.4.668", "node-releases": "^2.0.14", "update-browserslist-db": "^1.0.13" }, -- cgit v1.2.3