eslint-linter-browserify 9.6.0 → 9.7.0
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/linter.cjs +326 -124
- package/linter.js +326 -124
- package/linter.min.js +2 -2
- package/linter.mjs +326 -124
- package/package.json +5 -5
package/linter.cjs
CHANGED
|
@@ -6572,7 +6572,7 @@ function requireEslintScope () {
|
|
|
6572
6572
|
this.currentScope().__define(pattern,
|
|
6573
6573
|
new Definition(
|
|
6574
6574
|
Variable.CatchClause,
|
|
6575
|
-
|
|
6575
|
+
pattern,
|
|
6576
6576
|
node,
|
|
6577
6577
|
null,
|
|
6578
6578
|
null,
|
|
@@ -6830,7 +6830,7 @@ function requireEslintScope () {
|
|
|
6830
6830
|
|
|
6831
6831
|
/* vim: set sw=4 ts=4 et tw=80 : */
|
|
6832
6832
|
|
|
6833
|
-
const version = "8.0.
|
|
6833
|
+
const version = "8.0.2";
|
|
6834
6834
|
|
|
6835
6835
|
/*
|
|
6836
6836
|
Copyright (C) 2012-2014 Yusuke Suzuki <utatane.tea@gmail.com>
|
|
@@ -17501,7 +17501,7 @@ function requireLodash_merge () {
|
|
|
17501
17501
|
}
|
|
17502
17502
|
|
|
17503
17503
|
var name = "eslint";
|
|
17504
|
-
var version = "9.
|
|
17504
|
+
var version = "9.7.0";
|
|
17505
17505
|
var author = "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>";
|
|
17506
17506
|
var description$2 = "An AST-based pattern checker for JavaScript.";
|
|
17507
17507
|
var bin = {
|
|
@@ -17554,10 +17554,10 @@ var homepage = "https://eslint.org";
|
|
|
17554
17554
|
var bugs = "https://github.com/eslint/eslint/issues/";
|
|
17555
17555
|
var dependencies$2 = {
|
|
17556
17556
|
"@eslint-community/eslint-utils": "^4.2.0",
|
|
17557
|
-
"@eslint-community/regexpp": "^4.
|
|
17557
|
+
"@eslint-community/regexpp": "^4.11.0",
|
|
17558
17558
|
"@eslint/config-array": "^0.17.0",
|
|
17559
17559
|
"@eslint/eslintrc": "^3.1.0",
|
|
17560
|
-
"@eslint/js": "9.
|
|
17560
|
+
"@eslint/js": "9.7.0",
|
|
17561
17561
|
"@humanwhocodes/module-importer": "^1.0.1",
|
|
17562
17562
|
"@humanwhocodes/retry": "^0.3.0",
|
|
17563
17563
|
"@nodelib/fs.walk": "^1.2.8",
|
|
@@ -17566,7 +17566,7 @@ var dependencies$2 = {
|
|
|
17566
17566
|
"cross-spawn": "^7.0.2",
|
|
17567
17567
|
debug: "^4.3.2",
|
|
17568
17568
|
"escape-string-regexp": "^4.0.0",
|
|
17569
|
-
"eslint-scope": "^8.0.
|
|
17569
|
+
"eslint-scope": "^8.0.2",
|
|
17570
17570
|
"eslint-visitor-keys": "^4.0.0",
|
|
17571
17571
|
espree: "^10.1.0",
|
|
17572
17572
|
esquery: "^1.5.0",
|
|
@@ -17591,6 +17591,7 @@ var dependencies$2 = {
|
|
|
17591
17591
|
var devDependencies = {
|
|
17592
17592
|
"@babel/core": "^7.4.3",
|
|
17593
17593
|
"@babel/preset-env": "^7.4.3",
|
|
17594
|
+
"@eslint/core": "^0.1.0",
|
|
17594
17595
|
"@types/estree": "^1.0.5",
|
|
17595
17596
|
"@types/node": "^20.11.5",
|
|
17596
17597
|
"@wdio/browser-runner": "^8.38.3",
|
|
@@ -40675,6 +40676,10 @@ function requireSourceCode$1 () {
|
|
|
40675
40676
|
//------------------------------------------------------------------------------
|
|
40676
40677
|
|
|
40677
40678
|
/** @typedef {import("eslint-scope").Variable} Variable */
|
|
40679
|
+
/** @typedef {import("eslint-scope").Scope} Scope */
|
|
40680
|
+
/** @typedef {import("@eslint/core").SourceCode} ISourceCode */
|
|
40681
|
+
/** @typedef {import("@eslint/core").Directive} IDirective */
|
|
40682
|
+
/** @typedef {import("@eslint/core").TraversalStep} ITraversalStep */
|
|
40678
40683
|
|
|
40679
40684
|
//------------------------------------------------------------------------------
|
|
40680
40685
|
// Private
|
|
@@ -41019,6 +41024,7 @@ function requireSourceCode$1 () {
|
|
|
41019
41024
|
|
|
41020
41025
|
/**
|
|
41021
41026
|
* A class to represent a directive comment.
|
|
41027
|
+
* @implements {IDirective}
|
|
41022
41028
|
*/
|
|
41023
41029
|
class Directive {
|
|
41024
41030
|
|
|
@@ -41075,12 +41081,13 @@ function requireSourceCode$1 () {
|
|
|
41075
41081
|
|
|
41076
41082
|
/**
|
|
41077
41083
|
* Represents parsed source code.
|
|
41084
|
+
* @implements {ISourceCode}
|
|
41078
41085
|
*/
|
|
41079
41086
|
class SourceCode extends TokenStore {
|
|
41080
41087
|
|
|
41081
41088
|
/**
|
|
41082
41089
|
* The cache of steps that were taken while traversing the source code.
|
|
41083
|
-
* @type {Array<
|
|
41090
|
+
* @type {Array<ITraversalStep>}
|
|
41084
41091
|
*/
|
|
41085
41092
|
#steps;
|
|
41086
41093
|
|
|
@@ -41484,7 +41491,7 @@ function requireSourceCode$1 () {
|
|
|
41484
41491
|
/**
|
|
41485
41492
|
* Gets the scope for the given node
|
|
41486
41493
|
* @param {ASTNode} currentNode The node to get the scope of
|
|
41487
|
-
* @returns {
|
|
41494
|
+
* @returns {Scope} The scope information for this node
|
|
41488
41495
|
* @throws {TypeError} If the `currentNode` argument is missing.
|
|
41489
41496
|
*/
|
|
41490
41497
|
getScope(currentNode) {
|
|
@@ -41993,6 +42000,9 @@ function requireApplyDisableDirectives () {
|
|
|
41993
42000
|
//------------------------------------------------------------------------------
|
|
41994
42001
|
|
|
41995
42002
|
/** @typedef {import("../shared/types").LintMessage} LintMessage */
|
|
42003
|
+
/** @typedef {import("@eslint/core").Language} Language */
|
|
42004
|
+
/** @typedef {import("@eslint/core").Position} Position */
|
|
42005
|
+
/** @typedef {import("@eslint/core").RulesConfig} RulesConfig */
|
|
41996
42006
|
|
|
41997
42007
|
//------------------------------------------------------------------------------
|
|
41998
42008
|
// Module Definition
|
|
@@ -42007,8 +42017,8 @@ function requireApplyDisableDirectives () {
|
|
|
42007
42017
|
|
|
42008
42018
|
/**
|
|
42009
42019
|
* Compares the locations of two objects in a source file
|
|
42010
|
-
* @param {
|
|
42011
|
-
* @param {
|
|
42020
|
+
* @param {Position} itemA The first object
|
|
42021
|
+
* @param {Position} itemB The second object
|
|
42012
42022
|
* @returns {number} A value less than 1 if itemA appears before itemB in the source file, greater than 1 if
|
|
42013
42023
|
* itemA appears after itemB in the source file, or 0 if itemA and itemB have the same location.
|
|
42014
42024
|
*/
|
|
@@ -42401,7 +42411,7 @@ function requireApplyDisableDirectives () {
|
|
|
42401
42411
|
* @param {{ruleId: (string|null), line: number, column: number}[]} options.problems
|
|
42402
42412
|
* A list of problems reported by rules, sorted by increasing location in the file, with one-based columns.
|
|
42403
42413
|
* @param {"off" | "warn" | "error"} options.reportUnusedDisableDirectives If `"warn"` or `"error"`, adds additional problems for unused directives
|
|
42404
|
-
* @param {
|
|
42414
|
+
* @param {RulesConfig} options.configuredRules The rules configuration.
|
|
42405
42415
|
* @param {Function} options.ruleFilter A predicate function to filter which rules should be executed.
|
|
42406
42416
|
* @param {boolean} options.disableFixes If true, it doesn't make `fix` properties.
|
|
42407
42417
|
* @returns {{ruleId: (string|null), line: number, column: number, suppressions?: {kind: string, justification: string}}[]}
|
|
@@ -42825,10 +42835,8 @@ function requireNodeEventGenerator () {
|
|
|
42825
42835
|
* @returns {void}
|
|
42826
42836
|
*/
|
|
42827
42837
|
enterNode(node) {
|
|
42828
|
-
if (node.parent) {
|
|
42829
|
-
this.currentAncestry.unshift(node.parent);
|
|
42830
|
-
}
|
|
42831
42838
|
this.applySelectors(node, false);
|
|
42839
|
+
this.currentAncestry.unshift(node);
|
|
42832
42840
|
}
|
|
42833
42841
|
|
|
42834
42842
|
/**
|
|
@@ -42837,8 +42845,8 @@ function requireNodeEventGenerator () {
|
|
|
42837
42845
|
* @returns {void}
|
|
42838
42846
|
*/
|
|
42839
42847
|
leaveNode(node) {
|
|
42840
|
-
this.applySelectors(node, true);
|
|
42841
42848
|
this.currentAncestry.shift();
|
|
42849
|
+
this.applySelectors(node, true);
|
|
42842
42850
|
}
|
|
42843
42851
|
}
|
|
42844
42852
|
|
|
@@ -69489,7 +69497,7 @@ function requireRegexpp () {
|
|
|
69489
69497
|
__proto__: null
|
|
69490
69498
|
});
|
|
69491
69499
|
|
|
69492
|
-
const latestEcmaVersion =
|
|
69500
|
+
const latestEcmaVersion = 2025;
|
|
69493
69501
|
|
|
69494
69502
|
let largeIdStartRanges = undefined;
|
|
69495
69503
|
let largeIdContinueRanges = undefined;
|
|
@@ -69528,10 +69536,10 @@ function requireRegexpp () {
|
|
|
69528
69536
|
return isInRange(cp, largeIdContinueRanges !== null && largeIdContinueRanges !== void 0 ? largeIdContinueRanges : (largeIdContinueRanges = initLargeIdContinueRanges()));
|
|
69529
69537
|
}
|
|
69530
69538
|
function initLargeIdStartRanges() {
|
|
69531
|
-
return restoreRanges("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk
|
|
69539
|
+
return restoreRanges("4q 0 b 0 5 0 6 m 2 u 2 cp 5 b f 4 8 0 2 0 3m 4 2 1 3 3 2 0 7 0 2 2 2 0 2 j 2 2a 2 3u 9 4l 2 11 3 0 7 14 20 q 5 3 1a 16 10 1 2 2q 2 0 g 1 8 1 b 2 3 0 h 0 2 t u 2g c 0 p w a 1 5 0 6 l 5 0 a 0 4 0 o o 8 a 6 n 2 5 i 15 1n 1h 4 0 j 0 8 9 g f 5 7 3 1 3 l 2 6 2 0 4 3 4 0 h 0 e 1 2 2 f 1 b 0 9 5 5 1 3 l 2 6 2 1 2 1 2 1 w 3 2 0 k 2 h 8 2 2 2 l 2 6 2 1 2 4 4 0 j 0 g 1 o 0 c 7 3 1 3 l 2 6 2 1 2 4 4 0 v 1 2 2 g 0 i 0 2 5 4 2 2 3 4 1 2 0 2 1 4 1 4 2 4 b n 0 1h 7 2 2 2 m 2 f 4 0 r 2 3 0 3 1 v 0 5 7 2 2 2 m 2 9 2 4 4 0 w 1 2 1 g 1 i 8 2 2 2 14 3 0 h 0 6 2 9 2 p 5 6 h 4 n 2 8 2 0 3 6 1n 1b 2 1 d 6 1n 1 2 0 2 4 2 n 2 0 2 9 2 1 a 0 3 4 2 0 m 3 x 0 1s 7 2 z s 4 38 16 l 0 h 5 5 3 4 0 4 1 8 2 5 c d 0 i 11 2 0 6 0 3 16 2 98 2 3 3 6 2 0 2 3 3 14 2 3 3 w 2 3 3 6 2 0 2 3 3 e 2 1k 2 3 3 1u 12 f h 2d 3 5 4 h7 3 g 2 p 6 22 4 a 8 h e i f h f c 2 2 g 1f 10 0 5 0 1w 2g 8 14 2 0 6 1x b u 1e t 3 4 c 17 5 p 1j m a 1g 2b 0 2m 1a i 7 1j t e 1 b 17 r z 16 2 b z 3 8 8 16 3 2 16 3 2 5 2 1 4 0 6 5b 1t 7p 3 5 3 11 3 5 3 7 2 0 2 0 2 0 2 u 3 1g 2 6 2 0 4 2 2 6 4 3 3 5 5 c 6 2 2 6 39 0 e 0 h c 2u 0 5 0 3 9 2 0 3 5 7 0 2 0 2 0 2 f 3 3 6 4 5 0 i 14 22g 6c 7 3 4 1 d 11 2 0 6 0 3 1j 8 0 h m a 6 2 6 2 6 2 6 2 6 2 6 2 6 2 6 fb 2 q 8 8 4 3 4 5 2d 5 4 2 2h 2 3 6 16 2 2l i v 1d f e9 533 1t h3g 1w 19 3 7g 4 f b 1 l 1a h u 3 27 14 8 3 2u 3 1r 6 1 2 0 2 4 p f 2 2 2 3 2 m u 1f f 1d 1r 5 4 0 2 1 c r b m q s 8 1a t 0 h 4 2 9 b 4 2 14 o 2 2 7 l m 4 0 4 1d 2 0 4 1 3 4 3 0 2 0 p 2 3 a 8 2 d 5 3 5 3 5 a 6 2 6 2 16 2 d 7 36 u 8mb d m 5 1c 6it a5 3 2x 13 6 d 4 6 0 2 9 2 c 2 4 2 0 2 1 2 1 2 2z y a2 j 1r 3 1h 15 b 39 4 2 3q 11 p 7 p c 2g 4 5 3 5 3 5 3 2 10 b 2 p 2 i 2 1 2 e 3 d z 3e 1y 1g 7g s 4 1c 1c v e t 6 11 b t 3 z 5 7 2 4 17 4d j z 5 z 5 13 9 1f d a 2 e 2 6 2 1 2 a 2 e 2 6 2 1 1w 8m a l b 7 p 5 2 15 2 8 1y 5 3 0 2 17 2 1 4 0 3 m b m a u 1u i 2 1 b l b p 1z 1j 7 1 1t 0 g 3 2 2 2 s 17 s 4 s 10 7 2 r s 1h b l b i e h 33 20 1k 1e e 1e e z 9p 15 7 1 27 s b 0 9 l 17 h 1b k s m d 1g 1m 1 3 0 e 18 x o r z u 0 3 0 9 y 4 0 d 1b f 3 m 0 2 0 10 h 2 o k 1 1s 6 2 0 2 3 2 e 2 9 8 1a 13 7 3 1 3 l 2 6 2 1 2 4 4 0 j 0 d 4 4f 1g j 3 l 2 v 1b l 1 2 0 55 1a 16 3 11 1b l 0 1o 16 e 0 20 q 12 6 56 17 39 1r w 7 3 0 3 7 2 1 2 n g 0 2 0 2n 7 3 12 h 0 2 0 t 0 b 13 8 0 m 0 c 19 k 0 j 20 7c 8 2 10 i 0 1e t 35 6 2 1 2 11 m 0 q 5 2 1 2 v f 0 94 i g 0 2 c 2 x 3h 0 28 pl 2v 32 i 5f 219 2o g tr i 5 33u g6 6nu fs 8 u i 26 i t j 1b h 3 w k 6 i j5 1r 3l 22 6 0 1v c 1t 1 2 0 t 4qf 9 yd 17 8 6w8 3 2 6 2 1 2 82 g 0 u 2 3 0 f 3 9 az 1s5 2y 6 c 4 8 8 9 4mf 2c 2 1y 2 1 3 0 3 1 3 3 2 b 2 0 2 6 2 1s 2 3 3 7 2 6 2 r 2 3 2 4 2 0 4 6 2 9f 3 o 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 u 2 o 2 7 1f9 u 7 5 7a 1p 43 18 b 6 h 0 8y t j 17 dh r l1 6 2 3 2 1 2 e 2 5g 1o 1v 8 0 xh 3 2 q 2 1 2 0 3 0 2 9 2 3 2 0 2 0 7 0 5 0 2 0 2 0 2 2 2 1 2 0 3 0 2 0 2 0 2 0 2 0 2 1 2 0 3 3 2 6 2 3 2 3 2 0 2 9 2 g 6 2 2 4 2 g 3et wyn x 37d 7 65 3 4g1 f 5rk g h9 1wj f1 15v 3t6 6 38f");
|
|
69532
69540
|
}
|
|
69533
69541
|
function initLargeIdContinueRanges() {
|
|
69534
|
-
return restoreRanges("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r
|
|
69542
|
+
return restoreRanges("53 0 g9 33 o 0 70 4 7e 18 2 0 2 1 2 1 2 0 21 a 1d u 7 0 2u 6 3 5 3 1 2 3 3 9 o 0 v q 2k a g 9 y 8 a 0 p 3 2 8 2 2 2 4 18 2 1p 7 17 n 2 w 1j 2 2 h 2 6 b 1 3 9 i 2 1l 0 2 6 3 1 3 2 a 0 b 1 3 9 f 0 3 2 1l 0 2 4 5 1 3 2 4 0 l b 4 0 c 2 1l 0 2 7 2 2 2 2 l 1 3 9 b 5 2 2 1l 0 2 6 3 1 3 2 8 2 b 1 3 9 j 0 1o 4 4 2 2 3 a 0 f 9 h 4 1k 0 2 6 2 2 2 3 8 1 c 1 3 9 i 2 1l 0 2 6 2 2 2 3 8 1 c 1 3 9 4 0 d 3 1k 1 2 6 2 2 2 3 a 0 b 1 3 9 i 2 1z 0 5 5 2 0 2 7 7 9 3 1 1q 0 3 6 d 7 2 9 2g 0 3 8 c 6 2 9 1r 1 7 9 c 0 2 0 2 0 5 1 1e j 2 1 6 a 2 z a 0 2t j 2 9 d 3 5 2 2 2 3 6 4 3 e b 2 e jk 2 a 8 pt 3 t 2 u 1 v 1 1t v a 0 3 9 y 2 2 a 40 0 3b b 5 b b 9 3l a 1p 4 1m 9 2 s 3 a 7 9 n d 2 f 1e 4 1c g c 9 i 8 d 2 v c 3 9 19 d 1d j 9 9 7 9 3b 2 2 k 5 0 7 0 3 2 5j 1r el 1 1e 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 2p 0 n51 9 1y 0 5 9 x 1 29 1 7l 0 4 0 5 0 o 4 5 0 2c 1 1f h b 9 7 h e a t 7 q c 19 3 1c d g 9 c 0 b 9 1c d d 0 9 1 3 9 y 2 1f 0 2 2 3 1 6 1 2 0 16 4 6 1 6l 7 2 1 3 9 fmt 0 ki f h f 4 1 p 2 5d 9 12 0 12 0 ig 0 6b 0 46 4 86 9 120 2 2 1 6 3 15 2 5 0 4m 1 fy 3 9 9 aa 1 29 2 1z a 1e 3 3f 2 1i e w a 3 1 b 3 1a a 8 0 1a 9 7 2 11 d 2 9 6 1 19 0 d 2 1d d 9 3 2 b 2b b 7 0 3 0 4e b 6 9 7 3 1k 1 2 6 3 1 3 2 a 0 b 1 3 6 4 4 5d h a 9 5 0 2a j d 9 5y 6 3 8 s 1 2b g g 9 2a c 9 9 2c e 5 9 6r e 4m 9 1z 5 2 1 3 3 2 0 2 1 d 9 3c 6 3 6 4 0 t 9 15 6 2 3 9 0 a a 1b f ba 7 2 7 h 9 1l l 2 d 3f 5 4 0 2 1 2 6 2 0 9 9 1d 4 2 1 2 4 9 9 96 3 a 1 2 0 1d 6 4 4 e 9 44n 0 7 e aob 9 2f 9 13 4 1o 6 q 9 s6 0 2 1i 8 3 2a 0 c 1 f58 1 3mq 19 3 m f3 4 4 5 9 7 3 6 v 3 45 2 13e 1d e9 1i 5 1d 9 0 f 0 n 4 2 e 11t 6 2 g 3 6 2 1 2 4 2t 0 4h 6 a 9 9x 0 1q d dv d rb 6 32 6 6 9 3o7 9 gvt3 6n");
|
|
69535
69543
|
}
|
|
69536
69544
|
function isInRange(cp, ranges) {
|
|
69537
69545
|
let l = 0, r = (ranges.length / 2) | 0, i = 0, min = 0, max = 0;
|
|
@@ -69557,7 +69565,7 @@ function requireRegexpp () {
|
|
|
69557
69565
|
}
|
|
69558
69566
|
|
|
69559
69567
|
class DataSet {
|
|
69560
|
-
constructor(raw2018, raw2019, raw2020, raw2021, raw2022, raw2023, raw2024) {
|
|
69568
|
+
constructor(raw2018, raw2019, raw2020, raw2021, raw2022, raw2023, raw2024, raw2025) {
|
|
69561
69569
|
this._raw2018 = raw2018;
|
|
69562
69570
|
this._raw2019 = raw2019;
|
|
69563
69571
|
this._raw2020 = raw2020;
|
|
@@ -69565,6 +69573,7 @@ function requireRegexpp () {
|
|
|
69565
69573
|
this._raw2022 = raw2022;
|
|
69566
69574
|
this._raw2023 = raw2023;
|
|
69567
69575
|
this._raw2024 = raw2024;
|
|
69576
|
+
this._raw2025 = raw2025;
|
|
69568
69577
|
}
|
|
69569
69578
|
get es2018() {
|
|
69570
69579
|
var _a;
|
|
@@ -69594,12 +69603,17 @@ function requireRegexpp () {
|
|
|
69594
69603
|
var _a;
|
|
69595
69604
|
return ((_a = this._set2024) !== null && _a !== void 0 ? _a : (this._set2024 = new Set(this._raw2024.split(" "))));
|
|
69596
69605
|
}
|
|
69606
|
+
get es2025() {
|
|
69607
|
+
var _a;
|
|
69608
|
+
return ((_a = this._set2025) !== null && _a !== void 0 ? _a : (this._set2025 = new Set(this._raw2025.split(" "))));
|
|
69609
|
+
}
|
|
69597
69610
|
}
|
|
69598
69611
|
const gcNameSet = new Set(["General_Category", "gc"]);
|
|
69599
69612
|
const scNameSet = new Set(["Script", "Script_Extensions", "sc", "scx"]);
|
|
69600
|
-
const gcValueSets = new DataSet("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct", "", "", "", "", "", "");
|
|
69601
|
-
const scValueSets = new DataSet("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy", "Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo", "Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho", "Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", "Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi", "Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz", "");
|
|
69602
|
-
const binPropertySets = new DataSet("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space", "Extended_Pictographic", "", "EBase EComp EMod EPres ExtPict", "", "", "");
|
|
69613
|
+
const gcValueSets = new DataSet("C Cased_Letter Cc Cf Close_Punctuation Cn Co Combining_Mark Connector_Punctuation Control Cs Currency_Symbol Dash_Punctuation Decimal_Number Enclosing_Mark Final_Punctuation Format Initial_Punctuation L LC Letter Letter_Number Line_Separator Ll Lm Lo Lowercase_Letter Lt Lu M Mark Math_Symbol Mc Me Mn Modifier_Letter Modifier_Symbol N Nd Nl No Nonspacing_Mark Number Open_Punctuation Other Other_Letter Other_Number Other_Punctuation Other_Symbol P Paragraph_Separator Pc Pd Pe Pf Pi Po Private_Use Ps Punctuation S Sc Separator Sk Sm So Space_Separator Spacing_Mark Surrogate Symbol Titlecase_Letter Unassigned Uppercase_Letter Z Zl Zp Zs cntrl digit punct", "", "", "", "", "", "", "");
|
|
69614
|
+
const scValueSets = new DataSet("Adlam Adlm Aghb Ahom Anatolian_Hieroglyphs Arab Arabic Armenian Armi Armn Avestan Avst Bali Balinese Bamu Bamum Bass Bassa_Vah Batak Batk Beng Bengali Bhaiksuki Bhks Bopo Bopomofo Brah Brahmi Brai Braille Bugi Buginese Buhd Buhid Cakm Canadian_Aboriginal Cans Cari Carian Caucasian_Albanian Chakma Cham Cher Cherokee Common Copt Coptic Cprt Cuneiform Cypriot Cyrillic Cyrl Deseret Deva Devanagari Dsrt Dupl Duployan Egyp Egyptian_Hieroglyphs Elba Elbasan Ethi Ethiopic Geor Georgian Glag Glagolitic Gonm Goth Gothic Gran Grantha Greek Grek Gujarati Gujr Gurmukhi Guru Han Hang Hangul Hani Hano Hanunoo Hatr Hatran Hebr Hebrew Hira Hiragana Hluw Hmng Hung Imperial_Aramaic Inherited Inscriptional_Pahlavi Inscriptional_Parthian Ital Java Javanese Kaithi Kali Kana Kannada Katakana Kayah_Li Khar Kharoshthi Khmer Khmr Khoj Khojki Khudawadi Knda Kthi Lana Lao Laoo Latin Latn Lepc Lepcha Limb Limbu Lina Linb Linear_A Linear_B Lisu Lyci Lycian Lydi Lydian Mahajani Mahj Malayalam Mand Mandaic Mani Manichaean Marc Marchen Masaram_Gondi Meetei_Mayek Mend Mende_Kikakui Merc Mero Meroitic_Cursive Meroitic_Hieroglyphs Miao Mlym Modi Mong Mongolian Mro Mroo Mtei Mult Multani Myanmar Mymr Nabataean Narb Nbat New_Tai_Lue Newa Nko Nkoo Nshu Nushu Ogam Ogham Ol_Chiki Olck Old_Hungarian Old_Italic Old_North_Arabian Old_Permic Old_Persian Old_South_Arabian Old_Turkic Oriya Orkh Orya Osage Osge Osma Osmanya Pahawh_Hmong Palm Palmyrene Pau_Cin_Hau Pauc Perm Phag Phags_Pa Phli Phlp Phnx Phoenician Plrd Prti Psalter_Pahlavi Qaac Qaai Rejang Rjng Runic Runr Samaritan Samr Sarb Saur Saurashtra Sgnw Sharada Shavian Shaw Shrd Sidd Siddham SignWriting Sind Sinh Sinhala Sora Sora_Sompeng Soyo Soyombo Sund Sundanese Sylo Syloti_Nagri Syrc Syriac Tagalog Tagb Tagbanwa Tai_Le Tai_Tham Tai_Viet Takr Takri Tale Talu Tamil Taml Tang Tangut Tavt Telu Telugu Tfng Tglg Thaa Thaana Thai Tibetan Tibt Tifinagh Tirh Tirhuta Ugar Ugaritic Vai Vaii Wara Warang_Citi Xpeo Xsux Yi Yiii Zanabazar_Square Zanb Zinh Zyyy", "Dogr Dogra Gong Gunjala_Gondi Hanifi_Rohingya Maka Makasar Medefaidrin Medf Old_Sogdian Rohg Sogd Sogdian Sogo", "Elym Elymaic Hmnp Nand Nandinagari Nyiakeng_Puachue_Hmong Wancho Wcho", "Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi", "Cpmn Cypro_Minoan Old_Uyghur Ougr Tangsa Tnsa Toto Vith Vithkuqi", "Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz", "", "");
|
|
69615
|
+
const binPropertySets = new DataSet("AHex ASCII ASCII_Hex_Digit Alpha Alphabetic Any Assigned Bidi_C Bidi_Control Bidi_M Bidi_Mirrored CI CWCF CWCM CWKCF CWL CWT CWU Case_Ignorable Cased Changes_When_Casefolded Changes_When_Casemapped Changes_When_Lowercased Changes_When_NFKC_Casefolded Changes_When_Titlecased Changes_When_Uppercased DI Dash Default_Ignorable_Code_Point Dep Deprecated Dia Diacritic Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Ext Extender Gr_Base Gr_Ext Grapheme_Base Grapheme_Extend Hex Hex_Digit IDC IDS IDSB IDST IDS_Binary_Operator IDS_Trinary_Operator ID_Continue ID_Start Ideo Ideographic Join_C Join_Control LOE Logical_Order_Exception Lower Lowercase Math NChar Noncharacter_Code_Point Pat_Syn Pat_WS Pattern_Syntax Pattern_White_Space QMark Quotation_Mark RI Radical Regional_Indicator SD STerm Sentence_Terminal Soft_Dotted Term Terminal_Punctuation UIdeo Unified_Ideograph Upper Uppercase VS Variation_Selector White_Space XIDC XIDS XID_Continue XID_Start space", "Extended_Pictographic", "", "EBase EComp EMod EPres ExtPict", "", "", "", "");
|
|
69616
|
+
const binPropertyOfStringsSets = new DataSet("", "", "", "", "", "", "Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji RGI_Emoji_Flag_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence", "");
|
|
69603
69617
|
function isValidUnicodeProperty(version, name, value) {
|
|
69604
69618
|
if (gcNameSet.has(name)) {
|
|
69605
69619
|
return version >= 2018 && gcValueSets.es2018.has(value);
|
|
@@ -69619,6 +69633,9 @@ function requireRegexpp () {
|
|
|
69619
69633
|
(version >= 2019 && binPropertySets.es2019.has(value)) ||
|
|
69620
69634
|
(version >= 2021 && binPropertySets.es2021.has(value)));
|
|
69621
69635
|
}
|
|
69636
|
+
function isValidLoneUnicodePropertyOfString(version, value) {
|
|
69637
|
+
return version >= 2024 && binPropertyOfStringsSets.es2024.has(value);
|
|
69638
|
+
}
|
|
69622
69639
|
|
|
69623
69640
|
const BACKSPACE = 0x08;
|
|
69624
69641
|
const CHARACTER_TABULATION = 0x09;
|
|
@@ -69738,6 +69755,103 @@ function requireRegexpp () {
|
|
|
69738
69755
|
return (lead - 0xd800) * 0x400 + (trail - 0xdc00) + 0x10000;
|
|
69739
69756
|
}
|
|
69740
69757
|
|
|
69758
|
+
class GroupSpecifiersAsES2018 {
|
|
69759
|
+
constructor() {
|
|
69760
|
+
this.groupName = new Set();
|
|
69761
|
+
}
|
|
69762
|
+
clear() {
|
|
69763
|
+
this.groupName.clear();
|
|
69764
|
+
}
|
|
69765
|
+
isEmpty() {
|
|
69766
|
+
return !this.groupName.size;
|
|
69767
|
+
}
|
|
69768
|
+
hasInPattern(name) {
|
|
69769
|
+
return this.groupName.has(name);
|
|
69770
|
+
}
|
|
69771
|
+
hasInScope(name) {
|
|
69772
|
+
return this.hasInPattern(name);
|
|
69773
|
+
}
|
|
69774
|
+
addToScope(name) {
|
|
69775
|
+
this.groupName.add(name);
|
|
69776
|
+
}
|
|
69777
|
+
enterDisjunction() {
|
|
69778
|
+
}
|
|
69779
|
+
enterAlternative() {
|
|
69780
|
+
}
|
|
69781
|
+
leaveDisjunction() {
|
|
69782
|
+
}
|
|
69783
|
+
}
|
|
69784
|
+
class BranchID {
|
|
69785
|
+
constructor(parent, base) {
|
|
69786
|
+
this.parent = parent;
|
|
69787
|
+
this.base = base !== null && base !== void 0 ? base : this;
|
|
69788
|
+
}
|
|
69789
|
+
separatedFrom(other) {
|
|
69790
|
+
var _a, _b;
|
|
69791
|
+
if (this.base === other.base && this !== other) {
|
|
69792
|
+
return true;
|
|
69793
|
+
}
|
|
69794
|
+
if (other.parent && this.separatedFrom(other.parent)) {
|
|
69795
|
+
return true;
|
|
69796
|
+
}
|
|
69797
|
+
return (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.separatedFrom(other)) !== null && _b !== void 0 ? _b : false;
|
|
69798
|
+
}
|
|
69799
|
+
child() {
|
|
69800
|
+
return new BranchID(this, null);
|
|
69801
|
+
}
|
|
69802
|
+
sibling() {
|
|
69803
|
+
return new BranchID(this.parent, this.base);
|
|
69804
|
+
}
|
|
69805
|
+
}
|
|
69806
|
+
class GroupSpecifiersAsES2025 {
|
|
69807
|
+
constructor() {
|
|
69808
|
+
this.branchID = new BranchID(null, null);
|
|
69809
|
+
this.groupNames = new Map();
|
|
69810
|
+
}
|
|
69811
|
+
clear() {
|
|
69812
|
+
this.branchID = new BranchID(null, null);
|
|
69813
|
+
this.groupNames.clear();
|
|
69814
|
+
}
|
|
69815
|
+
isEmpty() {
|
|
69816
|
+
return !this.groupNames.size;
|
|
69817
|
+
}
|
|
69818
|
+
enterDisjunction() {
|
|
69819
|
+
this.branchID = this.branchID.child();
|
|
69820
|
+
}
|
|
69821
|
+
enterAlternative(index) {
|
|
69822
|
+
if (index === 0) {
|
|
69823
|
+
return;
|
|
69824
|
+
}
|
|
69825
|
+
this.branchID = this.branchID.sibling();
|
|
69826
|
+
}
|
|
69827
|
+
leaveDisjunction() {
|
|
69828
|
+
this.branchID = this.branchID.parent;
|
|
69829
|
+
}
|
|
69830
|
+
hasInPattern(name) {
|
|
69831
|
+
return this.groupNames.has(name);
|
|
69832
|
+
}
|
|
69833
|
+
hasInScope(name) {
|
|
69834
|
+
const branches = this.groupNames.get(name);
|
|
69835
|
+
if (!branches) {
|
|
69836
|
+
return false;
|
|
69837
|
+
}
|
|
69838
|
+
for (const branch of branches) {
|
|
69839
|
+
if (!branch.separatedFrom(this.branchID)) {
|
|
69840
|
+
return true;
|
|
69841
|
+
}
|
|
69842
|
+
}
|
|
69843
|
+
return false;
|
|
69844
|
+
}
|
|
69845
|
+
addToScope(name) {
|
|
69846
|
+
const branches = this.groupNames.get(name);
|
|
69847
|
+
if (branches) {
|
|
69848
|
+
branches.push(this.branchID);
|
|
69849
|
+
return;
|
|
69850
|
+
}
|
|
69851
|
+
this.groupNames.set(name, [this.branchID]);
|
|
69852
|
+
}
|
|
69853
|
+
}
|
|
69854
|
+
|
|
69741
69855
|
const legacyImpl = {
|
|
69742
69856
|
at(s, end, i) {
|
|
69743
69857
|
return i < end ? s.charCodeAt(i) : -1;
|
|
@@ -69843,35 +69957,25 @@ function requireRegexpp () {
|
|
|
69843
69957
|
}
|
|
69844
69958
|
|
|
69845
69959
|
class RegExpSyntaxError extends SyntaxError {
|
|
69846
|
-
constructor(
|
|
69847
|
-
|
|
69848
|
-
if (srcCtx.kind === "literal") {
|
|
69849
|
-
const literal = srcCtx.source.slice(srcCtx.start, srcCtx.end);
|
|
69850
|
-
if (literal) {
|
|
69851
|
-
source = `: ${literal}`;
|
|
69852
|
-
}
|
|
69853
|
-
}
|
|
69854
|
-
else if (srcCtx.kind === "pattern") {
|
|
69855
|
-
const pattern = srcCtx.source.slice(srcCtx.start, srcCtx.end);
|
|
69856
|
-
const flagsText = `${flags.unicode ? "u" : ""}${flags.unicodeSets ? "v" : ""}`;
|
|
69857
|
-
source = `: /${pattern}/${flagsText}`;
|
|
69858
|
-
}
|
|
69859
|
-
super(`Invalid regular expression${source}: ${message}`);
|
|
69960
|
+
constructor(message, index) {
|
|
69961
|
+
super(message);
|
|
69860
69962
|
this.index = index;
|
|
69861
69963
|
}
|
|
69862
69964
|
}
|
|
69863
|
-
|
|
69864
|
-
|
|
69865
|
-
"
|
|
69866
|
-
|
|
69867
|
-
|
|
69868
|
-
|
|
69869
|
-
|
|
69870
|
-
|
|
69871
|
-
"
|
|
69872
|
-
|
|
69873
|
-
|
|
69874
|
-
|
|
69965
|
+
function newRegExpSyntaxError(srcCtx, flags, index, message) {
|
|
69966
|
+
let source = "";
|
|
69967
|
+
if (srcCtx.kind === "literal") {
|
|
69968
|
+
const literal = srcCtx.source.slice(srcCtx.start, srcCtx.end);
|
|
69969
|
+
if (literal) {
|
|
69970
|
+
source = `: ${literal}`;
|
|
69971
|
+
}
|
|
69972
|
+
}
|
|
69973
|
+
else if (srcCtx.kind === "pattern") {
|
|
69974
|
+
const pattern = srcCtx.source.slice(srcCtx.start, srcCtx.end);
|
|
69975
|
+
const flagsText = `${flags.unicode ? "u" : ""}${flags.unicodeSets ? "v" : ""}`;
|
|
69976
|
+
source = `: /${pattern}/${flagsText}`;
|
|
69977
|
+
}
|
|
69978
|
+
return new RegExpSyntaxError(`Invalid regular expression${source}: ${message}`, index);
|
|
69875
69979
|
}
|
|
69876
69980
|
|
|
69877
69981
|
const SYNTAX_CHARACTER = new Set([
|
|
@@ -69980,10 +70084,13 @@ function requireRegexpp () {
|
|
|
69980
70084
|
this._lastStrValue = "";
|
|
69981
70085
|
this._lastAssertionIsQuantifiable = false;
|
|
69982
70086
|
this._numCapturingParens = 0;
|
|
69983
|
-
this._groupNames = new Set();
|
|
69984
70087
|
this._backreferenceNames = new Set();
|
|
69985
70088
|
this._srcCtx = null;
|
|
69986
70089
|
this._options = options !== null && options !== void 0 ? options : {};
|
|
70090
|
+
this._groupSpecifiers =
|
|
70091
|
+
this.ecmaVersion >= 2025
|
|
70092
|
+
? new GroupSpecifiersAsES2025()
|
|
70093
|
+
: new GroupSpecifiersAsES2018();
|
|
69987
70094
|
}
|
|
69988
70095
|
validateLiteral(source, start = 0, end = source.length) {
|
|
69989
70096
|
this._srcCtx = { source, start, end, kind: "literal" };
|
|
@@ -70026,7 +70133,7 @@ function requireRegexpp () {
|
|
|
70026
70133
|
this.consumePattern();
|
|
70027
70134
|
if (!this._nFlag &&
|
|
70028
70135
|
this.ecmaVersion >= 2018 &&
|
|
70029
|
-
this.
|
|
70136
|
+
!this._groupSpecifiers.isEmpty()) {
|
|
70030
70137
|
this._nFlag = true;
|
|
70031
70138
|
this.rewind(start);
|
|
70032
70139
|
this.consumePattern();
|
|
@@ -70325,7 +70432,7 @@ function requireRegexpp () {
|
|
|
70325
70432
|
}
|
|
70326
70433
|
raise(message, context) {
|
|
70327
70434
|
var _a, _b, _c;
|
|
70328
|
-
throw
|
|
70435
|
+
throw newRegExpSyntaxError(this._srcCtx, {
|
|
70329
70436
|
unicode: (_a = context === null || context === void 0 ? void 0 : context.unicode) !== null && _a !== void 0 ? _a : (this._unicodeMode && !this._unicodeSetsMode),
|
|
70330
70437
|
unicodeSets: (_b = context === null || context === void 0 ? void 0 : context.unicodeSets) !== null && _b !== void 0 ? _b : this._unicodeSetsMode,
|
|
70331
70438
|
}, (_c = context === null || context === void 0 ? void 0 : context.index) !== null && _c !== void 0 ? _c : this.index, message);
|
|
@@ -70363,7 +70470,7 @@ function requireRegexpp () {
|
|
|
70363
70470
|
consumePattern() {
|
|
70364
70471
|
const start = this.index;
|
|
70365
70472
|
this._numCapturingParens = this.countCapturingParens();
|
|
70366
|
-
this.
|
|
70473
|
+
this._groupSpecifiers.clear();
|
|
70367
70474
|
this._backreferenceNames.clear();
|
|
70368
70475
|
this.onPatternEnter(start);
|
|
70369
70476
|
this.consumeDisjunction();
|
|
@@ -70382,7 +70489,7 @@ function requireRegexpp () {
|
|
|
70382
70489
|
this.raise(`Unexpected character '${c}'`);
|
|
70383
70490
|
}
|
|
70384
70491
|
for (const name of this._backreferenceNames) {
|
|
70385
|
-
if (!this.
|
|
70492
|
+
if (!this._groupSpecifiers.hasInPattern(name)) {
|
|
70386
70493
|
this.raise("Invalid named capture referenced");
|
|
70387
70494
|
}
|
|
70388
70495
|
}
|
|
@@ -70423,6 +70530,7 @@ function requireRegexpp () {
|
|
|
70423
70530
|
consumeDisjunction() {
|
|
70424
70531
|
const start = this.index;
|
|
70425
70532
|
let i = 0;
|
|
70533
|
+
this._groupSpecifiers.enterDisjunction();
|
|
70426
70534
|
this.onDisjunctionEnter(start);
|
|
70427
70535
|
do {
|
|
70428
70536
|
this.consumeAlternative(i++);
|
|
@@ -70434,9 +70542,11 @@ function requireRegexpp () {
|
|
|
70434
70542
|
this.raise("Lone quantifier brackets");
|
|
70435
70543
|
}
|
|
70436
70544
|
this.onDisjunctionLeave(start, this.index);
|
|
70545
|
+
this._groupSpecifiers.leaveDisjunction();
|
|
70437
70546
|
}
|
|
70438
70547
|
consumeAlternative(i) {
|
|
70439
70548
|
const start = this.index;
|
|
70549
|
+
this._groupSpecifiers.enterAlternative(i);
|
|
70440
70550
|
this.onAlternativeEnter(start, i);
|
|
70441
70551
|
while (this.currentCodePoint !== -1 && this.consumeTerm()) {
|
|
70442
70552
|
}
|
|
@@ -70670,8 +70780,8 @@ function requireRegexpp () {
|
|
|
70670
70780
|
consumeGroupSpecifier() {
|
|
70671
70781
|
if (this.eat(QUESTION_MARK)) {
|
|
70672
70782
|
if (this.eatGroupName()) {
|
|
70673
|
-
if (!this.
|
|
70674
|
-
this.
|
|
70783
|
+
if (!this._groupSpecifiers.hasInScope(this._lastStrValue)) {
|
|
70784
|
+
this._groupSpecifiers.addToScope(this._lastStrValue);
|
|
70675
70785
|
return true;
|
|
70676
70786
|
}
|
|
70677
70787
|
this.raise("Duplicate capture group name");
|
|
@@ -71440,7 +71550,7 @@ function requireRegexpp () {
|
|
|
71440
71550
|
constructor(options) {
|
|
71441
71551
|
var _a;
|
|
71442
71552
|
this._node = DUMMY_PATTERN;
|
|
71443
|
-
this.
|
|
71553
|
+
this._expressionBufferMap = new Map();
|
|
71444
71554
|
this._flags = DUMMY_FLAGS;
|
|
71445
71555
|
this._backreferences = [];
|
|
71446
71556
|
this._capturingGroups = [];
|
|
@@ -71494,11 +71604,21 @@ function requireRegexpp () {
|
|
|
71494
71604
|
this._node.raw = this.source.slice(start, end);
|
|
71495
71605
|
for (const reference of this._backreferences) {
|
|
71496
71606
|
const ref = reference.ref;
|
|
71497
|
-
const
|
|
71498
|
-
? this._capturingGroups[ref - 1]
|
|
71499
|
-
: this._capturingGroups.
|
|
71500
|
-
|
|
71501
|
-
|
|
71607
|
+
const groups = typeof ref === "number"
|
|
71608
|
+
? [this._capturingGroups[ref - 1]]
|
|
71609
|
+
: this._capturingGroups.filter((g) => g.name === ref);
|
|
71610
|
+
if (groups.length === 1) {
|
|
71611
|
+
const group = groups[0];
|
|
71612
|
+
reference.ambiguous = false;
|
|
71613
|
+
reference.resolved = group;
|
|
71614
|
+
}
|
|
71615
|
+
else {
|
|
71616
|
+
reference.ambiguous = true;
|
|
71617
|
+
reference.resolved = groups;
|
|
71618
|
+
}
|
|
71619
|
+
for (const group of groups) {
|
|
71620
|
+
group.references.push(reference);
|
|
71621
|
+
}
|
|
71502
71622
|
}
|
|
71503
71623
|
}
|
|
71504
71624
|
onAlternativeEnter(start) {
|
|
@@ -71691,25 +71811,30 @@ function requireRegexpp () {
|
|
|
71691
71811
|
}
|
|
71692
71812
|
onUnicodePropertyCharacterSet(start, end, kind, key, value, negate, strings) {
|
|
71693
71813
|
const parent = this._node;
|
|
71694
|
-
if (
|
|
71695
|
-
parent.type !== "CharacterClass") ||
|
|
71696
|
-
(strings && (negate || value))) {
|
|
71814
|
+
if (parent.type !== "Alternative" && parent.type !== "CharacterClass") {
|
|
71697
71815
|
throw new Error("UnknownError");
|
|
71698
71816
|
}
|
|
71699
71817
|
const base = {
|
|
71700
71818
|
type: "CharacterSet",
|
|
71701
|
-
parent,
|
|
71819
|
+
parent: null,
|
|
71702
71820
|
start,
|
|
71703
71821
|
end,
|
|
71704
71822
|
raw: this.source.slice(start, end),
|
|
71705
71823
|
kind,
|
|
71706
|
-
strings,
|
|
71824
|
+
strings: null,
|
|
71707
71825
|
key,
|
|
71708
71826
|
};
|
|
71709
|
-
|
|
71710
|
-
|
|
71711
|
-
|
|
71712
|
-
|
|
71827
|
+
if (strings) {
|
|
71828
|
+
if ((parent.type === "CharacterClass" && !parent.unicodeSets) ||
|
|
71829
|
+
negate ||
|
|
71830
|
+
value !== null) {
|
|
71831
|
+
throw new Error("UnknownError");
|
|
71832
|
+
}
|
|
71833
|
+
parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate }));
|
|
71834
|
+
}
|
|
71835
|
+
else {
|
|
71836
|
+
parent.elements.push(Object.assign(Object.assign({}, base), { parent, strings, value, negate }));
|
|
71837
|
+
}
|
|
71713
71838
|
}
|
|
71714
71839
|
onCharacter(start, end, value) {
|
|
71715
71840
|
const parent = this._node;
|
|
@@ -71739,6 +71864,7 @@ function requireRegexpp () {
|
|
|
71739
71864
|
end,
|
|
71740
71865
|
raw: this.source.slice(start, end),
|
|
71741
71866
|
ref,
|
|
71867
|
+
ambiguous: false,
|
|
71742
71868
|
resolved: DUMMY_CAPTURING_GROUP,
|
|
71743
71869
|
};
|
|
71744
71870
|
parent.elements.push(node);
|
|
@@ -71777,19 +71903,21 @@ function requireRegexpp () {
|
|
|
71777
71903
|
const node = this._node;
|
|
71778
71904
|
if (node.type !== "CharacterClass" ||
|
|
71779
71905
|
(node.parent.type !== "Alternative" &&
|
|
71780
|
-
node.parent.type !== "CharacterClass")
|
|
71781
|
-
(this._expressionBuffer && node.elements.length > 0)) {
|
|
71906
|
+
node.parent.type !== "CharacterClass")) {
|
|
71782
71907
|
throw new Error("UnknownError");
|
|
71783
71908
|
}
|
|
71784
71909
|
const parent = node.parent;
|
|
71785
71910
|
node.end = end;
|
|
71786
71911
|
node.raw = this.source.slice(start, end);
|
|
71787
71912
|
this._node = parent;
|
|
71788
|
-
const expression = this.
|
|
71789
|
-
this._expressionBuffer = null;
|
|
71913
|
+
const expression = this._expressionBufferMap.get(node);
|
|
71790
71914
|
if (!expression) {
|
|
71791
71915
|
return;
|
|
71792
71916
|
}
|
|
71917
|
+
if (node.elements.length > 0) {
|
|
71918
|
+
throw new Error("UnknownError");
|
|
71919
|
+
}
|
|
71920
|
+
this._expressionBufferMap.delete(node);
|
|
71793
71921
|
const newNode = {
|
|
71794
71922
|
type: "ExpressionCharacterClass",
|
|
71795
71923
|
parent,
|
|
@@ -71847,7 +71975,7 @@ function requireRegexpp () {
|
|
|
71847
71975
|
throw new Error("UnknownError");
|
|
71848
71976
|
}
|
|
71849
71977
|
const right = parent.elements.pop();
|
|
71850
|
-
const left = (_a = this.
|
|
71978
|
+
const left = (_a = this._expressionBufferMap.get(parent)) !== null && _a !== void 0 ? _a : parent.elements.pop();
|
|
71851
71979
|
if (!left ||
|
|
71852
71980
|
!right ||
|
|
71853
71981
|
left.type === "ClassSubtraction" ||
|
|
@@ -71866,7 +71994,7 @@ function requireRegexpp () {
|
|
|
71866
71994
|
};
|
|
71867
71995
|
left.parent = node;
|
|
71868
71996
|
right.parent = node;
|
|
71869
|
-
this.
|
|
71997
|
+
this._expressionBufferMap.set(parent, node);
|
|
71870
71998
|
}
|
|
71871
71999
|
onClassSubtraction(start, end) {
|
|
71872
72000
|
var _a;
|
|
@@ -71875,7 +72003,7 @@ function requireRegexpp () {
|
|
|
71875
72003
|
throw new Error("UnknownError");
|
|
71876
72004
|
}
|
|
71877
72005
|
const right = parent.elements.pop();
|
|
71878
|
-
const left = (_a = this.
|
|
72006
|
+
const left = (_a = this._expressionBufferMap.get(parent)) !== null && _a !== void 0 ? _a : parent.elements.pop();
|
|
71879
72007
|
if (!left ||
|
|
71880
72008
|
!right ||
|
|
71881
72009
|
left.type === "ClassIntersection" ||
|
|
@@ -71894,7 +72022,7 @@ function requireRegexpp () {
|
|
|
71894
72022
|
};
|
|
71895
72023
|
left.parent = node;
|
|
71896
72024
|
right.parent = node;
|
|
71897
|
-
this.
|
|
72025
|
+
this._expressionBufferMap.set(parent, node);
|
|
71898
72026
|
}
|
|
71899
72027
|
onClassStringDisjunctionEnter(start) {
|
|
71900
72028
|
const parent = this._node;
|
|
@@ -72223,6 +72351,7 @@ function requireRegexpp () {
|
|
|
72223
72351
|
|
|
72224
72352
|
regexpp.AST = ast;
|
|
72225
72353
|
regexpp.RegExpParser = RegExpParser;
|
|
72354
|
+
regexpp.RegExpSyntaxError = RegExpSyntaxError;
|
|
72226
72355
|
regexpp.RegExpValidator = RegExpValidator;
|
|
72227
72356
|
regexpp.parseRegExpLiteral = parseRegExpLiteral;
|
|
72228
72357
|
regexpp.validateRegExpLiteral = validateRegExpLiteral;
|
|
@@ -81052,7 +81181,7 @@ function requireRegularExpressions () {
|
|
|
81052
81181
|
|
|
81053
81182
|
const { RegExpValidator } = requireRegexpp();
|
|
81054
81183
|
|
|
81055
|
-
const REGEXPP_LATEST_ECMA_VERSION =
|
|
81184
|
+
const REGEXPP_LATEST_ECMA_VERSION = 2025;
|
|
81056
81185
|
|
|
81057
81186
|
/**
|
|
81058
81187
|
* Checks if the given regular expression pattern would be valid with the `u` flag.
|
|
@@ -86749,6 +86878,9 @@ function requireNoRestrictedImports () {
|
|
|
86749
86878
|
minItems: 1,
|
|
86750
86879
|
uniqueItems: true
|
|
86751
86880
|
},
|
|
86881
|
+
regex: {
|
|
86882
|
+
type: "string"
|
|
86883
|
+
},
|
|
86752
86884
|
importNamePattern: {
|
|
86753
86885
|
type: "string"
|
|
86754
86886
|
},
|
|
@@ -86764,7 +86896,6 @@ function requireNoRestrictedImports () {
|
|
|
86764
86896
|
}
|
|
86765
86897
|
},
|
|
86766
86898
|
additionalProperties: false,
|
|
86767
|
-
required: ["group"],
|
|
86768
86899
|
not: {
|
|
86769
86900
|
anyOf: [
|
|
86770
86901
|
{ required: ["importNames", "allowImportNames"] },
|
|
@@ -86773,7 +86904,11 @@ function requireNoRestrictedImports () {
|
|
|
86773
86904
|
{ required: ["importNamePattern", "allowImportNames"] },
|
|
86774
86905
|
{ required: ["allowImportNames", "allowImportNamePattern"] }
|
|
86775
86906
|
]
|
|
86776
|
-
}
|
|
86907
|
+
},
|
|
86908
|
+
oneOf: [
|
|
86909
|
+
{ required: ["group"] },
|
|
86910
|
+
{ required: ["regex"] }
|
|
86911
|
+
]
|
|
86777
86912
|
},
|
|
86778
86913
|
uniqueItems: true
|
|
86779
86914
|
}
|
|
@@ -86895,9 +87030,10 @@ function requireNoRestrictedImports () {
|
|
|
86895
87030
|
|
|
86896
87031
|
// relative paths are supported for this rule
|
|
86897
87032
|
const restrictedPatternGroups = restrictedPatterns.map(
|
|
86898
|
-
({ group, message, caseSensitive, importNames, importNamePattern, allowImportNames, allowImportNamePattern }) => (
|
|
87033
|
+
({ group, regex, message, caseSensitive, importNames, importNamePattern, allowImportNames, allowImportNamePattern }) => (
|
|
86899
87034
|
{
|
|
86900
|
-
matcher: ignore({ allowRelativePaths: true, ignorecase: !caseSensitive }).add(group),
|
|
87035
|
+
...(group ? { matcher: ignore({ allowRelativePaths: true, ignorecase: !caseSensitive }).add(group) } : {}),
|
|
87036
|
+
...(typeof regex === "string" ? { regexMatcher: new RegExp(regex, caseSensitive ? "u" : "iu") } : {}),
|
|
86901
87037
|
customMessage: message,
|
|
86902
87038
|
importNames,
|
|
86903
87039
|
importNamePattern,
|
|
@@ -87153,7 +87289,7 @@ function requireNoRestrictedImports () {
|
|
|
87153
87289
|
* @private
|
|
87154
87290
|
*/
|
|
87155
87291
|
function isRestrictedPattern(importSource, group) {
|
|
87156
|
-
return group.matcher.ignores(importSource);
|
|
87292
|
+
return group.regexMatcher ? group.regexMatcher.test(importSource) : group.matcher.ignores(importSource);
|
|
87157
87293
|
}
|
|
87158
87294
|
|
|
87159
87295
|
/**
|
|
@@ -93254,7 +93390,7 @@ function requireNoUnusedVars () {
|
|
|
93254
93390
|
/**
|
|
93255
93391
|
* Determines if a variable has a sibling rest property
|
|
93256
93392
|
* @param {Variable} variable eslint-scope variable object.
|
|
93257
|
-
* @returns {boolean} True if the variable
|
|
93393
|
+
* @returns {boolean} True if the variable has a sibling rest property, false if not.
|
|
93258
93394
|
* @private
|
|
93259
93395
|
*/
|
|
93260
93396
|
function hasRestSpreadSibling(variable) {
|
|
@@ -94805,11 +94941,11 @@ function requireNoUselessBackreference () {
|
|
|
94805
94941
|
schema: [],
|
|
94806
94942
|
|
|
94807
94943
|
messages: {
|
|
94808
|
-
nested: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' from within that group.",
|
|
94809
|
-
forward: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which appears later in the pattern.",
|
|
94810
|
-
backward: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which appears before in the same lookbehind.",
|
|
94811
|
-
disjunctive: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which is in another alternative.",
|
|
94812
|
-
intoNegativeLookaround: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}' which is in a negative lookaround."
|
|
94944
|
+
nested: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} from within that group.",
|
|
94945
|
+
forward: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears later in the pattern.",
|
|
94946
|
+
backward: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which appears before in the same lookbehind.",
|
|
94947
|
+
disjunctive: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in another alternative.",
|
|
94948
|
+
intoNegativeLookaround: "Backreference '{{ bref }}' will be ignored. It references group '{{ group }}'{{ otherGroups }} which is in a negative lookaround."
|
|
94813
94949
|
}
|
|
94814
94950
|
},
|
|
94815
94951
|
|
|
@@ -94837,16 +94973,21 @@ function requireNoUselessBackreference () {
|
|
|
94837
94973
|
|
|
94838
94974
|
visitRegExpAST(regExpAST, {
|
|
94839
94975
|
onBackreferenceEnter(bref) {
|
|
94840
|
-
const
|
|
94841
|
-
brefPath = getPathToRoot(bref)
|
|
94842
|
-
groupPath = getPathToRoot(group);
|
|
94843
|
-
let messageId = null;
|
|
94976
|
+
const groups = [bref.resolved].flat(),
|
|
94977
|
+
brefPath = getPathToRoot(bref);
|
|
94844
94978
|
|
|
94845
|
-
|
|
94979
|
+
const problems = groups.map(group => {
|
|
94980
|
+
const groupPath = getPathToRoot(group);
|
|
94981
|
+
|
|
94982
|
+
if (brefPath.includes(group)) {
|
|
94983
|
+
|
|
94984
|
+
// group is bref's ancestor => bref is nested ('nested reference') => group hasn't matched yet when bref starts to match.
|
|
94985
|
+
return {
|
|
94986
|
+
messageId: "nested",
|
|
94987
|
+
group
|
|
94988
|
+
};
|
|
94989
|
+
}
|
|
94846
94990
|
|
|
94847
|
-
// group is bref's ancestor => bref is nested ('nested reference') => group hasn't matched yet when bref starts to match.
|
|
94848
|
-
messageId = "nested";
|
|
94849
|
-
} else {
|
|
94850
94991
|
|
|
94851
94992
|
// Start from the root to find the lowest common ancestor.
|
|
94852
94993
|
let i = brefPath.length - 1,
|
|
@@ -94863,35 +95004,80 @@ function requireNoUselessBackreference () {
|
|
|
94863
95004
|
lowestCommonLookaround = commonPath.find(isLookaround),
|
|
94864
95005
|
isMatchingBackward = lowestCommonLookaround && lowestCommonLookaround.kind === "lookbehind";
|
|
94865
95006
|
|
|
95007
|
+
if (groupCut.at(-1).type === "Alternative") {
|
|
95008
|
+
|
|
95009
|
+
// group's and bref's ancestor nodes below the lowest common ancestor are sibling alternatives => they're disjunctive.
|
|
95010
|
+
return {
|
|
95011
|
+
messageId: "disjunctive",
|
|
95012
|
+
group
|
|
95013
|
+
};
|
|
95014
|
+
}
|
|
94866
95015
|
if (!isMatchingBackward && bref.end <= group.start) {
|
|
94867
95016
|
|
|
94868
95017
|
// bref is left, group is right ('forward reference') => group hasn't matched yet when bref starts to match.
|
|
94869
|
-
|
|
94870
|
-
|
|
95018
|
+
return {
|
|
95019
|
+
messageId: "forward",
|
|
95020
|
+
group
|
|
95021
|
+
};
|
|
95022
|
+
}
|
|
95023
|
+
if (isMatchingBackward && group.end <= bref.start) {
|
|
94871
95024
|
|
|
94872
95025
|
// the opposite of the previous when the regex is matching backward in a lookbehind context.
|
|
94873
|
-
|
|
94874
|
-
|
|
94875
|
-
|
|
94876
|
-
|
|
94877
|
-
|
|
94878
|
-
|
|
95026
|
+
return {
|
|
95027
|
+
messageId: "backward",
|
|
95028
|
+
group
|
|
95029
|
+
};
|
|
95030
|
+
}
|
|
95031
|
+
if (groupCut.some(isNegativeLookaround)) {
|
|
94879
95032
|
|
|
94880
95033
|
// group is in a negative lookaround which isn't bref's ancestor => group has already failed when bref starts to match.
|
|
94881
|
-
|
|
95034
|
+
return {
|
|
95035
|
+
messageId: "intoNegativeLookaround",
|
|
95036
|
+
group
|
|
95037
|
+
};
|
|
94882
95038
|
}
|
|
95039
|
+
|
|
95040
|
+
return null;
|
|
95041
|
+
});
|
|
95042
|
+
|
|
95043
|
+
if (problems.length === 0 || problems.some(problem => !problem)) {
|
|
95044
|
+
|
|
95045
|
+
// If there are no problems or no problems with any group then do not report it.
|
|
95046
|
+
return;
|
|
94883
95047
|
}
|
|
94884
95048
|
|
|
94885
|
-
|
|
94886
|
-
|
|
94887
|
-
|
|
94888
|
-
|
|
94889
|
-
|
|
94890
|
-
|
|
94891
|
-
|
|
94892
|
-
|
|
94893
|
-
|
|
95049
|
+
let problemsToReport;
|
|
95050
|
+
|
|
95051
|
+
// Gets problems that appear in the same disjunction.
|
|
95052
|
+
const problemsInSameDisjunction = problems.filter(problem => problem.messageId !== "disjunctive");
|
|
95053
|
+
|
|
95054
|
+
if (problemsInSameDisjunction.length) {
|
|
95055
|
+
|
|
95056
|
+
// Only report problems that appear in the same disjunction.
|
|
95057
|
+
problemsToReport = problemsInSameDisjunction;
|
|
95058
|
+
} else {
|
|
95059
|
+
|
|
95060
|
+
// If all groups appear in different disjunctions, report it.
|
|
95061
|
+
problemsToReport = problems;
|
|
94894
95062
|
}
|
|
95063
|
+
|
|
95064
|
+
const [{ messageId, group }, ...other] = problemsToReport;
|
|
95065
|
+
let otherGroups = "";
|
|
95066
|
+
|
|
95067
|
+
if (other.length === 1) {
|
|
95068
|
+
otherGroups = " and another group";
|
|
95069
|
+
} else if (other.length > 1) {
|
|
95070
|
+
otherGroups = ` and other ${other.length} groups`;
|
|
95071
|
+
}
|
|
95072
|
+
context.report({
|
|
95073
|
+
node,
|
|
95074
|
+
messageId,
|
|
95075
|
+
data: {
|
|
95076
|
+
bref: bref.raw,
|
|
95077
|
+
group: group.raw,
|
|
95078
|
+
otherGroups
|
|
95079
|
+
}
|
|
95080
|
+
});
|
|
94895
95081
|
}
|
|
94896
95082
|
});
|
|
94897
95083
|
}
|
|
@@ -116516,7 +116702,9 @@ function requireJs () {
|
|
|
116516
116702
|
// Type Definitions
|
|
116517
116703
|
//-----------------------------------------------------------------------------
|
|
116518
116704
|
|
|
116519
|
-
/** @typedef {import("
|
|
116705
|
+
/** @typedef {import("@eslint/core").File} File */
|
|
116706
|
+
/** @typedef {import("@eslint/core").Language} Language */
|
|
116707
|
+
/** @typedef {import("@eslint/core").OkParseResult} OkParseResult */
|
|
116520
116708
|
|
|
116521
116709
|
//-----------------------------------------------------------------------------
|
|
116522
116710
|
// Helpers
|
|
@@ -116552,6 +116740,9 @@ function requireJs () {
|
|
|
116552
116740
|
// Exports
|
|
116553
116741
|
//-----------------------------------------------------------------------------
|
|
116554
116742
|
|
|
116743
|
+
/**
|
|
116744
|
+
* @type {Language}
|
|
116745
|
+
*/
|
|
116555
116746
|
js = {
|
|
116556
116747
|
|
|
116557
116748
|
fileType: "text",
|
|
@@ -116639,7 +116830,7 @@ function requireJs () {
|
|
|
116639
116830
|
|
|
116640
116831
|
/**
|
|
116641
116832
|
* Parses the given file into an AST.
|
|
116642
|
-
* @param {
|
|
116833
|
+
* @param {File} file The virtual file to parse.
|
|
116643
116834
|
* @param {Object} options Additional options passed from ESLint.
|
|
116644
116835
|
* @param {LanguageOptions} options.languageOptions The language options.
|
|
116645
116836
|
* @returns {Object} The result of parsing.
|
|
@@ -116696,7 +116887,7 @@ function requireJs () {
|
|
|
116696
116887
|
} catch (ex) {
|
|
116697
116888
|
|
|
116698
116889
|
// If the message includes a leading line number, strip it:
|
|
116699
|
-
const message =
|
|
116890
|
+
const message = ex.message.replace(/^line \d+:/iu, "").trim();
|
|
116700
116891
|
|
|
116701
116892
|
debug("%s\n%s", message, ex.stack);
|
|
116702
116893
|
|
|
@@ -116714,8 +116905,8 @@ function requireJs () {
|
|
|
116714
116905
|
|
|
116715
116906
|
/**
|
|
116716
116907
|
* Creates a new `SourceCode` object from the given information.
|
|
116717
|
-
* @param {
|
|
116718
|
-
* @param {
|
|
116908
|
+
* @param {File} file The virtual file to create a `SourceCode` object from.
|
|
116909
|
+
* @param {OkParseResult} parseResult The result returned from `parse()`.
|
|
116719
116910
|
* @param {Object} options Additional options passed from ESLint.
|
|
116720
116911
|
* @param {LanguageOptions} options.languageOptions The language options.
|
|
116721
116912
|
* @returns {SourceCode} The new `SourceCode` object.
|
|
@@ -117302,6 +117493,12 @@ function requireVfile () {
|
|
|
117302
117493
|
if (hasRequiredVfile) return vfile;
|
|
117303
117494
|
hasRequiredVfile = 1;
|
|
117304
117495
|
|
|
117496
|
+
//-----------------------------------------------------------------------------
|
|
117497
|
+
// Type Definitions
|
|
117498
|
+
//-----------------------------------------------------------------------------
|
|
117499
|
+
|
|
117500
|
+
/** @typedef {import("@eslint/core").File} File */
|
|
117501
|
+
|
|
117305
117502
|
//------------------------------------------------------------------------------
|
|
117306
117503
|
// Helpers
|
|
117307
117504
|
//------------------------------------------------------------------------------
|
|
@@ -117351,6 +117548,7 @@ function requireVfile () {
|
|
|
117351
117548
|
|
|
117352
117549
|
/**
|
|
117353
117550
|
* Represents a virtual file inside of ESLint.
|
|
117551
|
+
* @implements {File}
|
|
117354
117552
|
*/
|
|
117355
117553
|
class VFile {
|
|
117356
117554
|
|
|
@@ -117475,6 +117673,10 @@ function requireLinter () {
|
|
|
117475
117673
|
/** @typedef {import("../shared/types").Processor} Processor */
|
|
117476
117674
|
/** @typedef {import("../shared/types").Rule} Rule */
|
|
117477
117675
|
/** @typedef {import("../shared/types").Times} Times */
|
|
117676
|
+
/** @typedef {import("@eslint/core").Language} Language */
|
|
117677
|
+
/** @typedef {import("@eslint/core").RuleSeverity} RuleSeverity */
|
|
117678
|
+
/** @typedef {import("@eslint/core").RuleConfig} RuleConfig */
|
|
117679
|
+
|
|
117478
117680
|
|
|
117479
117681
|
/* eslint-disable jsdoc/valid-types -- https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/4#issuecomment-778805577 */
|
|
117480
117682
|
/**
|
|
@@ -117679,7 +117881,7 @@ function requireLinter () {
|
|
|
117679
117881
|
* @param {string} [options.ruleId] the ruleId to report
|
|
117680
117882
|
* @param {Object} [options.loc] the loc to report
|
|
117681
117883
|
* @param {string} [options.message] the error message to report
|
|
117682
|
-
* @param {
|
|
117884
|
+
* @param {RuleSeverity} [options.severity] the error message to report
|
|
117683
117885
|
* @param {Language} [options.language] the language to use to adjust the location information
|
|
117684
117886
|
* @returns {LintMessage} created problem, returns a missing-rule problem if only provided ruleId.
|
|
117685
117887
|
* @private
|
|
@@ -118280,7 +118482,7 @@ function requireLinter () {
|
|
|
118280
118482
|
|
|
118281
118483
|
/**
|
|
118282
118484
|
* Get the options for a rule (not including severity), if any
|
|
118283
|
-
* @param {
|
|
118485
|
+
* @param {RuleConfig} ruleConfig rule configuration
|
|
118284
118486
|
* @returns {Array} of rule options, empty Array if none
|
|
118285
118487
|
*/
|
|
118286
118488
|
function getRuleOptions(ruleConfig) {
|
|
@@ -118344,7 +118546,7 @@ function requireLinter () {
|
|
|
118344
118546
|
nodeType: null,
|
|
118345
118547
|
fatal: true,
|
|
118346
118548
|
severity: 2,
|
|
118347
|
-
message: error.message
|
|
118549
|
+
message: `Parsing error: ${error.message}`,
|
|
118348
118550
|
line: error.line,
|
|
118349
118551
|
column: error.column
|
|
118350
118552
|
}))
|