xo 0.53.1 → 0.54.1
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/config/plugins.cjs +34 -4
- package/lib/options-manager.js +11 -58
- package/node_modules/@eslint-community/eslint-utils/README.md +37 -0
- package/node_modules/{eslint-utils → @eslint-community/eslint-utils}/index.js +124 -12
- package/node_modules/@eslint-community/eslint-utils/index.js.map +1 -0
- package/node_modules/{eslint-utils → @eslint-community/eslint-utils}/index.mjs +124 -11
- package/node_modules/@eslint-community/eslint-utils/index.mjs.map +1 -0
- package/node_modules/@eslint-community/eslint-utils/package.json +73 -0
- package/node_modules/{regexpp → @eslint-community/regexpp}/README.md +9 -10
- package/node_modules/@eslint-community/regexpp/index.d.ts +781 -0
- package/node_modules/{regexpp → @eslint-community/regexpp}/index.js +297 -262
- package/node_modules/@eslint-community/regexpp/index.js.map +1 -0
- package/node_modules/{regexpp → @eslint-community/regexpp}/index.mjs +297 -262
- package/node_modules/@eslint-community/regexpp/index.mjs.map +1 -0
- package/node_modules/{regexpp → @eslint-community/regexpp}/package.json +60 -64
- package/node_modules/@typescript-eslint/eslint-plugin/LICENSE +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/README.md +6 -92
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js +11 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/configs/strict.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js +4 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js +3 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/block-spacing.js +158 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/block-spacing.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js +17 -7
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-generic-constructors.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js +47 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js +5 -11
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js +61 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/enum-utils/shared.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js +22 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js +14 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/key-spacing.js +351 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/key-spacing.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js +53 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-around-comment.js +384 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-around-comment.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js +205 -39
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js +14 -13
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/enums.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js +5 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/schema.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js +6 -6
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention-utils/validator.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js +231 -198
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js +5 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-void-expression.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js +158 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-duplicate-type-constituents.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js +19 -16
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js +45 -4
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js +79 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-import-type-side-effects.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js +15 -15
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js +196 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-mixed-enums.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-nullish-coalescing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js +3 -3
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redundant-type-constituents.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js +6 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js +21 -31
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js +22 -7
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js +4 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js +9 -9
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-argument.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.js +119 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-enum-comparison.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/object-curly-spacing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/padding-line-between-statements.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js +3 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js +4 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js +19 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js +47 -11
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js +3 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js +7 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js +5 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-constituents.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js +5 -5
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/sort-type-union-intersection-members.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-blocks.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-blocks.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js +46 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js +1 -2
- package/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/collectUnusedVariables.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getESLintCoreRule.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js +20 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getStringLength.js.map +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js +2 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/getWrappingFixer.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js +1 -0
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/isNullLiteral.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js +27 -1
- package/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js.map +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/README.md +3 -3
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md +3 -8
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/block-spacing.md +12 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-indexed-object-style.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-exports.md +2 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md +9 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md +52 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/key-spacing.md +12 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-around-comment.md +37 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md +181 -20
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md +7 -6
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-duplicate-type-constituents.md +61 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md +1 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-import-type-side-effects.md +75 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-mixed-enums.md +88 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md +2 -2
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md +21 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-enum-comparison.md +75 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/prefer-function-type.md +5 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/promise-function-async.md +18 -1
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/restrict-template-expressions.md +9 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/strict-boolean-expressions.md +6 -0
- package/node_modules/@typescript-eslint/eslint-plugin/docs/rules/unified-signatures.md +7 -10
- package/node_modules/@typescript-eslint/eslint-plugin/package.json +13 -9
- package/node_modules/@typescript-eslint/parser/LICENSE +5 -5
- package/node_modules/@typescript-eslint/parser/README.md +6 -300
- package/node_modules/@typescript-eslint/parser/_ts3.4/dist/index.d.ts +4 -0
- package/node_modules/@typescript-eslint/parser/dist/index.d.ts +4 -0
- package/node_modules/@typescript-eslint/parser/dist/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/parser/dist/index.js +5 -1
- package/node_modules/@typescript-eslint/parser/dist/index.js.map +1 -1
- package/node_modules/@typescript-eslint/parser/dist/parser.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/parser/dist/parser.js +20 -18
- package/node_modules/@typescript-eslint/parser/dist/parser.js.map +1 -1
- package/node_modules/@typescript-eslint/parser/package.json +6 -6
- package/node_modules/@typescript-eslint/scope-manager/LICENSE +1 -1
- package/node_modules/@typescript-eslint/scope-manager/README.md +5 -117
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js +10 -10
- package/node_modules/@typescript-eslint/scope-manager/dist/ScopeManager.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/definition/Definition.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js +21 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/decorators.legacy.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js +5 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.iterable.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js +44 -10
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/dom.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2015.symbol.wellknown.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js +12 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.intl.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js +2 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2019.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js +2 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js +15 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2022.regexp.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js +24 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.array.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts +3 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.full.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js +11 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es2023.js.map +1 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js +3 -105
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/es5.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/esnext.js +2 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts +7 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js +14 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/index.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js +2 -0
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.iterable.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js +43 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/lib/webworker.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts +4 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js +14 -6
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ClassVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ExportVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/ImportVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts +2 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js +10 -12
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/PatternVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js +17 -17
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Reference.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts +2 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js +5 -2
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Referencer.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/TypeVisitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/Visitor.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/referencer/VisitorBase.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/Scope.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/dist/scope/ScopeBase.js.map +1 -1
- package/node_modules/@typescript-eslint/scope-manager/package.json +12 -12
- package/node_modules/@typescript-eslint/type-utils/LICENSE +1 -1
- package/node_modules/@typescript-eslint/type-utils/README.md +7 -10
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/containsAllTypesByName.d.ts +4 -2
- package/node_modules/@typescript-eslint/type-utils/_ts3.4/dist/typeFlagUtils.d.ts +8 -3
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts +4 -2
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js +12 -6
- package/node_modules/@typescript-eslint/type-utils/dist/containsAllTypesByName.js.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js +2 -4
- package/node_modules/@typescript-eslint/type-utils/dist/isTypeReadonly.js.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts +8 -3
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js +11 -4
- package/node_modules/@typescript-eslint/type-utils/dist/typeFlagUtils.js.map +1 -1
- package/node_modules/@typescript-eslint/type-utils/package.json +6 -6
- package/node_modules/@typescript-eslint/types/LICENSE +1 -1
- package/node_modules/@typescript-eslint/types/README.md +6 -11
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/generated/ast-spec.d.ts +90 -16
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/lib.d.ts +1 -1
- package/node_modules/@typescript-eslint/types/_ts3.4/dist/parser-options.d.ts +9 -5
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts +90 -16
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js +3 -0
- package/node_modules/@typescript-eslint/types/dist/generated/ast-spec.js.map +1 -1
- package/node_modules/@typescript-eslint/types/dist/lib.d.ts +1 -1
- package/node_modules/@typescript-eslint/types/dist/lib.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts +9 -5
- package/node_modules/@typescript-eslint/types/dist/parser-options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/types/package.json +6 -6
- package/node_modules/@typescript-eslint/typescript-estree/LICENSE +5 -5
- package/node_modules/@typescript-eslint/typescript-estree/README.md +6 -379
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/clear-caches.d.ts +10 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/describeFilePath.d.ts +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/{createWatchProgram.d.ts → getWatchProgramsForProjects.d.ts} +3 -4
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/create-program/shared.d.ts +8 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/index.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/ExpiringCache.d.ts +17 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/createParseSettings.d.ts +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/getProjectConfigFiles.d.ts +12 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/index.d.ts +8 -3
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parseSettings/resolveProjectList.d.ts +19 -0
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser-options.d.ts +23 -4
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/parser.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/simple-traverse.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/estree-to-ts-node-types.d.ts +4 -1
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/ts-estree/ts-nodes.d.ts +4 -2
- package/node_modules/@typescript-eslint/typescript-estree/_ts3.4/dist/version-check.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts +10 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js +24 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/clear-caches.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert-comments.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js +62 -16
- package/node_modules/@typescript-eslint/typescript-estree/dist/convert.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createDefaultProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js +7 -12
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createProjectProgram.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js +32 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/describeFilePath.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/{createWatchProgram.d.ts → getWatchProgramsForProjects.d.ts} +3 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/{createWatchProgram.js → getWatchProgramsForProjects.js} +16 -20
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/getWatchProgramsForProjects.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts +8 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js +15 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/shared.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js +3 -3
- package/node_modules/@typescript-eslint/typescript-estree/dist/getModifiers.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts +2 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.js +2 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/index.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js +18 -5
- package/node_modules/@typescript-eslint/typescript-estree/dist/node-utils.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts +17 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js +62 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/ExpiringCache.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js +22 -48
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/createParseSettings.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts +12 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js +70 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/getProjectConfigFiles.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts +8 -3
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/index.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts +19 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.d.ts.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js +103 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/resolveProjectList.js.map +1 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js +4 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/parseSettings/warnAboutTSVersion.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts +23 -4
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser-options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/parser.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/simple-traverse.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts +4 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/estree-to-ts-node-types.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts +4 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js +2 -0
- package/node_modules/@typescript-eslint/typescript-estree/dist/version-check.js.map +1 -1
- package/node_modules/@typescript-eslint/typescript-estree/package.json +5 -6
- package/node_modules/@typescript-eslint/utils/LICENSE +1 -1
- package/node_modules/@typescript-eslint/utils/README.md +6 -23
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +4 -4
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +4 -4
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/astUtilities.d.ts +6 -6
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/predicates.d.ts +5 -5
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/helpers.d.ts +60 -6
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ast-utils/predicates.d.ts +13 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/InferTypesFromRule.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/RuleCreator.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/deepMerge.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/RuleTester.d.ts +3 -3
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/Rule.d.ts +6 -6
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/RuleTester.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint/SourceCode.d.ts +5 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Options.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Reference.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/_ts3.4/dist/ts-eslint-scope/Scope.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.d.ts +4 -4
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js +2 -2
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/PatternMatcher.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.d.ts +4 -4
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js +2 -2
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/ReferenceTracker.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.d.ts +6 -6
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js +7 -7
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/astUtilities.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts +5 -5
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/predicates.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js +3 -3
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/eslint-utils/scopeAnalysis.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts +60 -6
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/helpers.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts +13 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js +15 -1
- package/node_modules/@typescript-eslint/utils/dist/ast-utils/predicates.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.d.ts +3 -3
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.js +40 -27
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/RuleTester.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts +2 -2
- package/node_modules/@typescript-eslint/utils/dist/eslint-utils/rule-tester/dependencyConstraints.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts +6 -6
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/Rule.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/RuleTester.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts +5 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint/SourceCode.js.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Options.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Options.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Reference.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Reference.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Scope.d.ts +1 -1
- package/node_modules/@typescript-eslint/utils/dist/ts-eslint-scope/Scope.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/utils/package.json +8 -8
- package/node_modules/@typescript-eslint/visitor-keys/LICENSE +1 -1
- package/node_modules/@typescript-eslint/visitor-keys/README.md +6 -9
- package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.d.ts.map +1 -1
- package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js +63 -48
- package/node_modules/@typescript-eslint/visitor-keys/dist/visitor-keys.js.map +1 -1
- package/node_modules/@typescript-eslint/visitor-keys/package.json +4 -4
- package/node_modules/eslint-config-xo-typescript/index.js +8 -11
- package/node_modules/eslint-config-xo-typescript/package.json +5 -5
- package/node_modules/eslint-visitor-keys/README.md +1 -2
- package/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +38 -36
- package/node_modules/eslint-visitor-keys/lib/visitor-keys.js +38 -35
- package/node_modules/eslint-visitor-keys/package.json +16 -6
- package/node_modules/fastq/README.md +1 -1
- package/node_modules/fastq/index.d.ts +1 -1
- package/node_modules/fastq/package.json +1 -1
- package/node_modules/fastq/queue.js +6 -0
- package/node_modules/fastq/test/promise.js +27 -0
- package/node_modules/grapheme-splitter/LICENSE +22 -0
- package/node_modules/grapheme-splitter/README.md +111 -0
- package/node_modules/grapheme-splitter/index.d.ts +24 -0
- package/node_modules/grapheme-splitter/index.js +1743 -0
- package/node_modules/grapheme-splitter/package.json +34 -0
- package/node_modules/grapheme-splitter/tests/GraphemeBreakTest.txt +850 -0
- package/node_modules/grapheme-splitter/tests/grapheme_splitter_tests.js +83 -0
- package/node_modules/ignore/README.md +3 -3
- package/node_modules/ignore/index.js +24 -9
- package/node_modules/ignore/legacy.js +176 -135
- package/node_modules/ignore/package.json +13 -11
- package/node_modules/semver/README.md +56 -0
- package/node_modules/semver/bin/semver.js +8 -2
- package/node_modules/semver/classes/comparator.js +37 -33
- package/node_modules/semver/classes/range.js +6 -2
- package/node_modules/semver/classes/semver.js +10 -9
- package/node_modules/semver/functions/diff.js +24 -8
- package/node_modules/semver/functions/inc.js +3 -2
- package/node_modules/semver/functions/parse.js +0 -10
- package/node_modules/semver/index.js +1 -0
- package/node_modules/semver/internal/constants.js +15 -2
- package/node_modules/semver/internal/parse-options.js +14 -10
- package/node_modules/semver/package.json +7 -6
- package/node_modules/semver/ranges/intersects.js +1 -1
- package/node_modules/semver/ranges/subset.js +6 -3
- package/package.json +19 -19
- package/readme.md +1 -2
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.d.ts.map +0 -1
- package/node_modules/@typescript-eslint/typescript-estree/dist/create-program/createWatchProgram.js.map +0 -1
- package/node_modules/braces/CHANGELOG.md +0 -184
- package/node_modules/eslint-scope/CHANGELOG.md +0 -70
- package/node_modules/eslint-utils/README.md +0 -38
- package/node_modules/eslint-utils/index.js.map +0 -1
- package/node_modules/eslint-utils/index.mjs.map +0 -1
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/CHANGELOG.md +0 -36
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/LICENSE +0 -201
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/README.md +0 -98
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/index.js +0 -81
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/lib/visitor-keys.json +0 -289
- package/node_modules/eslint-utils/node_modules/eslint-visitor-keys/package.json +0 -39
- package/node_modules/eslint-utils/package.json +0 -78
- package/node_modules/glob-parent/CHANGELOG.md +0 -110
- package/node_modules/picomatch/CHANGELOG.md +0 -136
- package/node_modules/regexpp/index.d.ts +0 -248
- package/node_modules/regexpp/index.js.map +0 -1
- package/node_modules/regexpp/index.mjs.map +0 -1
- /package/node_modules/{eslint-utils → @eslint-community/eslint-utils}/LICENSE +0 -0
- /package/node_modules/{regexpp → @eslint-community/regexpp}/LICENSE +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/LICENSE +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/README.md +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/iterator.js +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/package.json +0 -0
- /package/node_modules/{yallist → semver/node_modules/yallist}/yallist.js +0 -0
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
/*! @author Toru Nagashima <https://github.com/mysticatea> */
|
|
2
|
-
|
|
3
|
-
|
|
4
1
|
var ast = /*#__PURE__*/Object.freeze({
|
|
5
|
-
|
|
2
|
+
__proto__: null
|
|
6
3
|
});
|
|
7
4
|
|
|
8
5
|
let largeIdStartRanges = undefined;
|
|
@@ -36,17 +33,16 @@ function isIdContinue(cp) {
|
|
|
36
33
|
return isLargeIdStart(cp) || isLargeIdContinue(cp);
|
|
37
34
|
}
|
|
38
35
|
function isLargeIdStart(cp) {
|
|
39
|
-
return isInRange(cp, largeIdStartRanges
|
|
36
|
+
return isInRange(cp, largeIdStartRanges !== null && largeIdStartRanges !== void 0 ? largeIdStartRanges : (largeIdStartRanges = initLargeIdStartRanges()));
|
|
40
37
|
}
|
|
41
38
|
function isLargeIdContinue(cp) {
|
|
42
|
-
return isInRange(cp, largeIdContinueRanges
|
|
43
|
-
(largeIdContinueRanges = initLargeIdContinueRanges()));
|
|
39
|
+
return isInRange(cp, largeIdContinueRanges !== null && largeIdContinueRanges !== void 0 ? largeIdContinueRanges : (largeIdContinueRanges = initLargeIdContinueRanges()));
|
|
44
40
|
}
|
|
45
41
|
function initLargeIdStartRanges() {
|
|
46
|
-
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
|
|
42
|
+
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 2e8 f1 15v 3t6 6 38f");
|
|
47
43
|
}
|
|
48
44
|
function initLargeIdContinueRanges() {
|
|
49
|
-
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
|
|
45
|
+
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 g0 1 k 0 3g c 5 0 4 b 2db 2 3y 0 2p v ff 5 2y 1 n7q 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 ji 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");
|
|
50
46
|
}
|
|
51
47
|
function isInRange(cp, ranges) {
|
|
52
48
|
let l = 0, r = (ranges.length / 2) | 0, i = 0, min = 0, max = 0;
|
|
@@ -68,34 +64,48 @@ function isInRange(cp, ranges) {
|
|
|
68
64
|
}
|
|
69
65
|
function restoreRanges(data) {
|
|
70
66
|
let last = 0;
|
|
71
|
-
return data.split(" ").map(s => (last += parseInt(s, 36) | 0));
|
|
67
|
+
return data.split(" ").map((s) => (last += parseInt(s, 36) | 0));
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
class DataSet {
|
|
75
|
-
constructor(raw2018, raw2019, raw2020, raw2021) {
|
|
71
|
+
constructor(raw2018, raw2019, raw2020, raw2021, raw2022, raw2023) {
|
|
76
72
|
this._raw2018 = raw2018;
|
|
77
73
|
this._raw2019 = raw2019;
|
|
78
74
|
this._raw2020 = raw2020;
|
|
79
75
|
this._raw2021 = raw2021;
|
|
76
|
+
this._raw2022 = raw2022;
|
|
77
|
+
this._raw2023 = raw2023;
|
|
80
78
|
}
|
|
81
79
|
get es2018() {
|
|
82
|
-
|
|
80
|
+
var _a;
|
|
81
|
+
return ((_a = this._set2018) !== null && _a !== void 0 ? _a : (this._set2018 = new Set(this._raw2018.split(" "))));
|
|
83
82
|
}
|
|
84
83
|
get es2019() {
|
|
85
|
-
|
|
84
|
+
var _a;
|
|
85
|
+
return ((_a = this._set2019) !== null && _a !== void 0 ? _a : (this._set2019 = new Set(this._raw2019.split(" "))));
|
|
86
86
|
}
|
|
87
87
|
get es2020() {
|
|
88
|
-
|
|
88
|
+
var _a;
|
|
89
|
+
return ((_a = this._set2020) !== null && _a !== void 0 ? _a : (this._set2020 = new Set(this._raw2020.split(" "))));
|
|
89
90
|
}
|
|
90
91
|
get es2021() {
|
|
91
|
-
|
|
92
|
+
var _a;
|
|
93
|
+
return ((_a = this._set2021) !== null && _a !== void 0 ? _a : (this._set2021 = new Set(this._raw2021.split(" "))));
|
|
94
|
+
}
|
|
95
|
+
get es2022() {
|
|
96
|
+
var _a;
|
|
97
|
+
return ((_a = this._set2022) !== null && _a !== void 0 ? _a : (this._set2022 = new Set(this._raw2022.split(" "))));
|
|
98
|
+
}
|
|
99
|
+
get es2023() {
|
|
100
|
+
var _a;
|
|
101
|
+
return ((_a = this._set2023) !== null && _a !== void 0 ? _a : (this._set2023 = new Set(this._raw2023.split(" "))));
|
|
92
102
|
}
|
|
93
103
|
}
|
|
94
104
|
const gcNameSet = new Set(["General_Category", "gc"]);
|
|
95
105
|
const scNameSet = new Set(["Script", "Script_Extensions", "sc", "scx"]);
|
|
96
|
-
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", "", "", "");
|
|
97
|
-
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");
|
|
98
|
-
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");
|
|
106
|
+
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", "", "", "", "", "");
|
|
107
|
+
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");
|
|
108
|
+
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", "", "");
|
|
99
109
|
function isValidUnicodeProperty(version, name, value) {
|
|
100
110
|
if (gcNameSet.has(name)) {
|
|
101
111
|
return version >= 2018 && gcValueSets.es2018.has(value);
|
|
@@ -104,7 +114,9 @@ function isValidUnicodeProperty(version, name, value) {
|
|
|
104
114
|
return ((version >= 2018 && scValueSets.es2018.has(value)) ||
|
|
105
115
|
(version >= 2019 && scValueSets.es2019.has(value)) ||
|
|
106
116
|
(version >= 2020 && scValueSets.es2020.has(value)) ||
|
|
107
|
-
(version >= 2021 && scValueSets.es2021.has(value))
|
|
117
|
+
(version >= 2021 && scValueSets.es2021.has(value)) ||
|
|
118
|
+
(version >= 2022 && scValueSets.es2022.has(value)) ||
|
|
119
|
+
(version >= 2023 && scValueSets.es2023.has(value)));
|
|
108
120
|
}
|
|
109
121
|
return false;
|
|
110
122
|
}
|
|
@@ -114,105 +126,105 @@ function isValidLoneUnicodeProperty(version, value) {
|
|
|
114
126
|
(version >= 2021 && binPropertySets.es2021.has(value)));
|
|
115
127
|
}
|
|
116
128
|
|
|
117
|
-
const
|
|
118
|
-
const
|
|
119
|
-
const
|
|
120
|
-
const
|
|
121
|
-
const
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
const
|
|
125
|
-
const
|
|
126
|
-
const
|
|
127
|
-
const
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
const
|
|
131
|
-
const
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
const
|
|
136
|
-
const
|
|
137
|
-
const
|
|
138
|
-
const
|
|
139
|
-
const
|
|
140
|
-
const
|
|
141
|
-
const
|
|
142
|
-
const
|
|
143
|
-
const
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
const
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
const
|
|
151
|
-
const
|
|
152
|
-
const
|
|
153
|
-
const
|
|
154
|
-
const
|
|
155
|
-
const
|
|
156
|
-
const
|
|
157
|
-
const
|
|
158
|
-
const
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
const
|
|
162
|
-
const
|
|
163
|
-
const
|
|
164
|
-
const
|
|
165
|
-
const
|
|
166
|
-
const
|
|
167
|
-
const
|
|
168
|
-
const
|
|
169
|
-
const
|
|
170
|
-
const
|
|
171
|
-
const
|
|
172
|
-
const
|
|
173
|
-
const
|
|
174
|
-
const
|
|
175
|
-
const
|
|
176
|
-
const
|
|
177
|
-
const
|
|
178
|
-
const
|
|
179
|
-
const
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
const
|
|
129
|
+
const BACKSPACE = 0x08;
|
|
130
|
+
const CHARACTER_TABULATION = 0x09;
|
|
131
|
+
const LINE_FEED = 0x0a;
|
|
132
|
+
const LINE_TABULATION = 0x0b;
|
|
133
|
+
const FORM_FEED = 0x0c;
|
|
134
|
+
const CARRIAGE_RETURN = 0x0d;
|
|
135
|
+
const EXCLAMATION_MARK = 0x21;
|
|
136
|
+
const DOLLAR_SIGN = 0x24;
|
|
137
|
+
const LEFT_PARENTHESIS = 0x28;
|
|
138
|
+
const RIGHT_PARENTHESIS = 0x29;
|
|
139
|
+
const ASTERISK = 0x2a;
|
|
140
|
+
const PLUS_SIGN = 0x2b;
|
|
141
|
+
const COMMA = 0x2c;
|
|
142
|
+
const HYPHEN_MINUS = 0x2d;
|
|
143
|
+
const FULL_STOP = 0x2e;
|
|
144
|
+
const SOLIDUS = 0x2f;
|
|
145
|
+
const DIGIT_ZERO = 0x30;
|
|
146
|
+
const DIGIT_ONE = 0x31;
|
|
147
|
+
const DIGIT_SEVEN = 0x37;
|
|
148
|
+
const DIGIT_NINE = 0x39;
|
|
149
|
+
const COLON = 0x3a;
|
|
150
|
+
const LESS_THAN_SIGN = 0x3c;
|
|
151
|
+
const EQUALS_SIGN = 0x3d;
|
|
152
|
+
const GREATER_THAN_SIGN = 0x3e;
|
|
153
|
+
const QUESTION_MARK = 0x3f;
|
|
154
|
+
const LATIN_CAPITAL_LETTER_A = 0x41;
|
|
155
|
+
const LATIN_CAPITAL_LETTER_B = 0x42;
|
|
156
|
+
const LATIN_CAPITAL_LETTER_D = 0x44;
|
|
157
|
+
const LATIN_CAPITAL_LETTER_F = 0x46;
|
|
158
|
+
const LATIN_CAPITAL_LETTER_P = 0x50;
|
|
159
|
+
const LATIN_CAPITAL_LETTER_S = 0x53;
|
|
160
|
+
const LATIN_CAPITAL_LETTER_W = 0x57;
|
|
161
|
+
const LATIN_CAPITAL_LETTER_Z = 0x5a;
|
|
162
|
+
const LOW_LINE = 0x5f;
|
|
163
|
+
const LATIN_SMALL_LETTER_A = 0x61;
|
|
164
|
+
const LATIN_SMALL_LETTER_B = 0x62;
|
|
165
|
+
const LATIN_SMALL_LETTER_C = 0x63;
|
|
166
|
+
const LATIN_SMALL_LETTER_D = 0x64;
|
|
167
|
+
const LATIN_SMALL_LETTER_F = 0x66;
|
|
168
|
+
const LATIN_SMALL_LETTER_G = 0x67;
|
|
169
|
+
const LATIN_SMALL_LETTER_I = 0x69;
|
|
170
|
+
const LATIN_SMALL_LETTER_K = 0x6b;
|
|
171
|
+
const LATIN_SMALL_LETTER_M = 0x6d;
|
|
172
|
+
const LATIN_SMALL_LETTER_N = 0x6e;
|
|
173
|
+
const LATIN_SMALL_LETTER_P = 0x70;
|
|
174
|
+
const LATIN_SMALL_LETTER_R = 0x72;
|
|
175
|
+
const LATIN_SMALL_LETTER_S = 0x73;
|
|
176
|
+
const LATIN_SMALL_LETTER_T = 0x74;
|
|
177
|
+
const LATIN_SMALL_LETTER_U = 0x75;
|
|
178
|
+
const LATIN_SMALL_LETTER_V = 0x76;
|
|
179
|
+
const LATIN_SMALL_LETTER_W = 0x77;
|
|
180
|
+
const LATIN_SMALL_LETTER_X = 0x78;
|
|
181
|
+
const LATIN_SMALL_LETTER_Y = 0x79;
|
|
182
|
+
const LATIN_SMALL_LETTER_Z = 0x7a;
|
|
183
|
+
const LEFT_SQUARE_BRACKET = 0x5b;
|
|
184
|
+
const REVERSE_SOLIDUS = 0x5c;
|
|
185
|
+
const RIGHT_SQUARE_BRACKET = 0x5d;
|
|
186
|
+
const CIRCUMFLEX_ACCENT = 0x5e;
|
|
187
|
+
const LEFT_CURLY_BRACKET = 0x7b;
|
|
188
|
+
const VERTICAL_LINE = 0x7c;
|
|
189
|
+
const RIGHT_CURLY_BRACKET = 0x7d;
|
|
190
|
+
const ZERO_WIDTH_NON_JOINER = 0x200c;
|
|
191
|
+
const ZERO_WIDTH_JOINER = 0x200d;
|
|
192
|
+
const LINE_SEPARATOR = 0x2028;
|
|
193
|
+
const PARAGRAPH_SEPARATOR = 0x2029;
|
|
194
|
+
const MIN_CODE_POINT = 0x00;
|
|
195
|
+
const MAX_CODE_POINT = 0x10ffff;
|
|
184
196
|
function isLatinLetter(code) {
|
|
185
|
-
return ((code >=
|
|
186
|
-
(code >=
|
|
197
|
+
return ((code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_Z) ||
|
|
198
|
+
(code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_Z));
|
|
187
199
|
}
|
|
188
200
|
function isDecimalDigit(code) {
|
|
189
|
-
return code >=
|
|
201
|
+
return code >= DIGIT_ZERO && code <= DIGIT_NINE;
|
|
190
202
|
}
|
|
191
203
|
function isOctalDigit(code) {
|
|
192
|
-
return code >=
|
|
204
|
+
return code >= DIGIT_ZERO && code <= DIGIT_SEVEN;
|
|
193
205
|
}
|
|
194
206
|
function isHexDigit(code) {
|
|
195
|
-
return ((code >=
|
|
196
|
-
(code >=
|
|
197
|
-
(code >=
|
|
207
|
+
return ((code >= DIGIT_ZERO && code <= DIGIT_NINE) ||
|
|
208
|
+
(code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) ||
|
|
209
|
+
(code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F));
|
|
198
210
|
}
|
|
199
211
|
function isLineTerminator(code) {
|
|
200
|
-
return (code ===
|
|
201
|
-
code ===
|
|
202
|
-
code ===
|
|
203
|
-
code ===
|
|
212
|
+
return (code === LINE_FEED ||
|
|
213
|
+
code === CARRIAGE_RETURN ||
|
|
214
|
+
code === LINE_SEPARATOR ||
|
|
215
|
+
code === PARAGRAPH_SEPARATOR);
|
|
204
216
|
}
|
|
205
217
|
function isValidUnicode(code) {
|
|
206
|
-
return code >=
|
|
218
|
+
return code >= MIN_CODE_POINT && code <= MAX_CODE_POINT;
|
|
207
219
|
}
|
|
208
220
|
function digitToInt(code) {
|
|
209
|
-
if (code >=
|
|
210
|
-
return code -
|
|
221
|
+
if (code >= LATIN_SMALL_LETTER_A && code <= LATIN_SMALL_LETTER_F) {
|
|
222
|
+
return code - LATIN_SMALL_LETTER_A + 10;
|
|
211
223
|
}
|
|
212
|
-
if (code >=
|
|
213
|
-
return code -
|
|
224
|
+
if (code >= LATIN_CAPITAL_LETTER_A && code <= LATIN_CAPITAL_LETTER_F) {
|
|
225
|
+
return code - LATIN_CAPITAL_LETTER_A + 10;
|
|
214
226
|
}
|
|
215
|
-
return code -
|
|
227
|
+
return code - DIGIT_ZERO;
|
|
216
228
|
}
|
|
217
229
|
function isLeadSurrogate(code) {
|
|
218
230
|
return code >= 0xd800 && code <= 0xdbff;
|
|
@@ -342,33 +354,33 @@ class RegExpSyntaxError extends SyntaxError {
|
|
|
342
354
|
}
|
|
343
355
|
|
|
344
356
|
function isSyntaxCharacter(cp) {
|
|
345
|
-
return (cp ===
|
|
346
|
-
cp ===
|
|
347
|
-
cp ===
|
|
348
|
-
cp ===
|
|
349
|
-
cp ===
|
|
350
|
-
cp ===
|
|
351
|
-
cp ===
|
|
352
|
-
cp ===
|
|
353
|
-
cp ===
|
|
354
|
-
cp ===
|
|
355
|
-
cp ===
|
|
356
|
-
cp ===
|
|
357
|
-
cp ===
|
|
358
|
-
cp ===
|
|
357
|
+
return (cp === CIRCUMFLEX_ACCENT ||
|
|
358
|
+
cp === DOLLAR_SIGN ||
|
|
359
|
+
cp === REVERSE_SOLIDUS ||
|
|
360
|
+
cp === FULL_STOP ||
|
|
361
|
+
cp === ASTERISK ||
|
|
362
|
+
cp === PLUS_SIGN ||
|
|
363
|
+
cp === QUESTION_MARK ||
|
|
364
|
+
cp === LEFT_PARENTHESIS ||
|
|
365
|
+
cp === RIGHT_PARENTHESIS ||
|
|
366
|
+
cp === LEFT_SQUARE_BRACKET ||
|
|
367
|
+
cp === RIGHT_SQUARE_BRACKET ||
|
|
368
|
+
cp === LEFT_CURLY_BRACKET ||
|
|
369
|
+
cp === RIGHT_CURLY_BRACKET ||
|
|
370
|
+
cp === VERTICAL_LINE);
|
|
359
371
|
}
|
|
360
372
|
function isRegExpIdentifierStart(cp) {
|
|
361
|
-
return isIdStart(cp) || cp ===
|
|
373
|
+
return isIdStart(cp) || cp === DOLLAR_SIGN || cp === LOW_LINE;
|
|
362
374
|
}
|
|
363
375
|
function isRegExpIdentifierPart(cp) {
|
|
364
376
|
return (isIdContinue(cp) ||
|
|
365
|
-
cp ===
|
|
366
|
-
cp ===
|
|
367
|
-
cp ===
|
|
368
|
-
cp ===
|
|
377
|
+
cp === DOLLAR_SIGN ||
|
|
378
|
+
cp === LOW_LINE ||
|
|
379
|
+
cp === ZERO_WIDTH_NON_JOINER ||
|
|
380
|
+
cp === ZERO_WIDTH_JOINER);
|
|
369
381
|
}
|
|
370
382
|
function isUnicodePropertyNameCharacter(cp) {
|
|
371
|
-
return isLatinLetter(cp) || cp ===
|
|
383
|
+
return isLatinLetter(cp) || cp === LOW_LINE;
|
|
372
384
|
}
|
|
373
385
|
function isUnicodePropertyValueCharacter(cp) {
|
|
374
386
|
return isUnicodePropertyNameCharacter(cp) || isDecimalDigit(cp);
|
|
@@ -388,13 +400,13 @@ class RegExpValidator {
|
|
|
388
400
|
this._numCapturingParens = 0;
|
|
389
401
|
this._groupNames = new Set();
|
|
390
402
|
this._backreferenceNames = new Set();
|
|
391
|
-
this._options = options
|
|
403
|
+
this._options = options !== null && options !== void 0 ? options : {};
|
|
392
404
|
}
|
|
393
405
|
validateLiteral(source, start = 0, end = source.length) {
|
|
394
406
|
this._uFlag = this._nFlag = false;
|
|
395
407
|
this.reset(source, start, end);
|
|
396
408
|
this.onLiteralEnter(start);
|
|
397
|
-
if (this.eat(
|
|
409
|
+
if (this.eat(SOLIDUS) && this.eatRegExpBody() && this.eat(SOLIDUS)) {
|
|
398
410
|
const flagStart = this.index;
|
|
399
411
|
const uFlag = source.includes("u", flagStart);
|
|
400
412
|
this.validateFlags(source, flagStart, end);
|
|
@@ -424,36 +436,50 @@ class RegExpValidator {
|
|
|
424
436
|
this.raise(`Duplicated flag '${source[i]}'`);
|
|
425
437
|
}
|
|
426
438
|
existingFlags.add(flag);
|
|
427
|
-
if (flag ===
|
|
439
|
+
if (flag === LATIN_SMALL_LETTER_G) {
|
|
428
440
|
global = true;
|
|
429
441
|
}
|
|
430
|
-
else if (flag ===
|
|
442
|
+
else if (flag === LATIN_SMALL_LETTER_I) {
|
|
431
443
|
ignoreCase = true;
|
|
432
444
|
}
|
|
433
|
-
else if (flag ===
|
|
445
|
+
else if (flag === LATIN_SMALL_LETTER_M) {
|
|
434
446
|
multiline = true;
|
|
435
447
|
}
|
|
436
|
-
else if (flag ===
|
|
448
|
+
else if (flag === LATIN_SMALL_LETTER_U &&
|
|
449
|
+
this.ecmaVersion >= 2015) {
|
|
437
450
|
unicode = true;
|
|
438
451
|
}
|
|
439
|
-
else if (flag ===
|
|
452
|
+
else if (flag === LATIN_SMALL_LETTER_Y &&
|
|
453
|
+
this.ecmaVersion >= 2015) {
|
|
440
454
|
sticky = true;
|
|
441
455
|
}
|
|
442
|
-
else if (flag ===
|
|
456
|
+
else if (flag === LATIN_SMALL_LETTER_S &&
|
|
457
|
+
this.ecmaVersion >= 2018) {
|
|
443
458
|
dotAll = true;
|
|
444
459
|
}
|
|
445
|
-
else if (flag ===
|
|
460
|
+
else if (flag === LATIN_SMALL_LETTER_D &&
|
|
461
|
+
this.ecmaVersion >= 2022) {
|
|
446
462
|
hasIndices = true;
|
|
447
463
|
}
|
|
448
464
|
else {
|
|
449
465
|
this.raise(`Invalid flag '${source[i]}'`);
|
|
450
466
|
}
|
|
451
467
|
}
|
|
452
|
-
this.
|
|
468
|
+
this.onRegExpFlags(start, end, {
|
|
469
|
+
global,
|
|
470
|
+
ignoreCase,
|
|
471
|
+
multiline,
|
|
472
|
+
unicode,
|
|
473
|
+
sticky,
|
|
474
|
+
dotAll,
|
|
475
|
+
hasIndices,
|
|
476
|
+
});
|
|
453
477
|
}
|
|
454
478
|
validatePattern(source, start = 0, end = source.length, uFlag = false) {
|
|
455
479
|
this._uFlag = uFlag && this.ecmaVersion >= 2015;
|
|
456
|
-
this._nFlag =
|
|
480
|
+
this._nFlag =
|
|
481
|
+
(uFlag && this.ecmaVersion >= 2018) ||
|
|
482
|
+
Boolean(this._options.strict && this.ecmaVersion >= 2023);
|
|
457
483
|
this.reset(source, start, end);
|
|
458
484
|
this.consumePattern();
|
|
459
485
|
if (!this._nFlag &&
|
|
@@ -465,10 +491,11 @@ class RegExpValidator {
|
|
|
465
491
|
}
|
|
466
492
|
}
|
|
467
493
|
get strict() {
|
|
468
|
-
return Boolean(this._options.strict || this._uFlag
|
|
494
|
+
return Boolean(this._options.strict) || this._uFlag;
|
|
469
495
|
}
|
|
470
496
|
get ecmaVersion() {
|
|
471
|
-
|
|
497
|
+
var _a;
|
|
498
|
+
return (_a = this._options.ecmaVersion) !== null && _a !== void 0 ? _a : 2023;
|
|
472
499
|
}
|
|
473
500
|
onLiteralEnter(start) {
|
|
474
501
|
if (this._options.onLiteralEnter) {
|
|
@@ -480,9 +507,12 @@ class RegExpValidator {
|
|
|
480
507
|
this._options.onLiteralLeave(start, end);
|
|
481
508
|
}
|
|
482
509
|
}
|
|
483
|
-
|
|
510
|
+
onRegExpFlags(start, end, flags) {
|
|
511
|
+
if (this._options.onRegExpFlags) {
|
|
512
|
+
this._options.onRegExpFlags(start, end, flags);
|
|
513
|
+
}
|
|
484
514
|
if (this._options.onFlags) {
|
|
485
|
-
this._options.onFlags(start, end, global, ignoreCase, multiline, unicode, sticky, dotAll, hasIndices);
|
|
515
|
+
this._options.onFlags(start, end, flags.global, flags.ignoreCase, flags.multiline, flags.unicode, flags.sticky, flags.dotAll, flags.hasIndices);
|
|
486
516
|
}
|
|
487
517
|
}
|
|
488
518
|
onPatternEnter(start) {
|
|
@@ -652,17 +682,17 @@ class RegExpValidator {
|
|
|
652
682
|
if (escaped) {
|
|
653
683
|
escaped = false;
|
|
654
684
|
}
|
|
655
|
-
else if (cp ===
|
|
685
|
+
else if (cp === REVERSE_SOLIDUS) {
|
|
656
686
|
escaped = true;
|
|
657
687
|
}
|
|
658
|
-
else if (cp ===
|
|
688
|
+
else if (cp === LEFT_SQUARE_BRACKET) {
|
|
659
689
|
inClass = true;
|
|
660
690
|
}
|
|
661
|
-
else if (cp ===
|
|
691
|
+
else if (cp === RIGHT_SQUARE_BRACKET) {
|
|
662
692
|
inClass = false;
|
|
663
693
|
}
|
|
664
|
-
else if ((cp ===
|
|
665
|
-
(cp ===
|
|
694
|
+
else if ((cp === SOLIDUS && !inClass) ||
|
|
695
|
+
(cp === ASTERISK && this.index === start)) {
|
|
666
696
|
break;
|
|
667
697
|
}
|
|
668
698
|
this.advance();
|
|
@@ -678,13 +708,13 @@ class RegExpValidator {
|
|
|
678
708
|
this.consumeDisjunction();
|
|
679
709
|
const cp = this.currentCodePoint;
|
|
680
710
|
if (this.currentCodePoint !== -1) {
|
|
681
|
-
if (cp ===
|
|
711
|
+
if (cp === RIGHT_PARENTHESIS) {
|
|
682
712
|
this.raise("Unmatched ')'");
|
|
683
713
|
}
|
|
684
|
-
if (cp ===
|
|
714
|
+
if (cp === REVERSE_SOLIDUS) {
|
|
685
715
|
this.raise("\\ at end of pattern");
|
|
686
716
|
}
|
|
687
|
-
if (cp ===
|
|
717
|
+
if (cp === RIGHT_SQUARE_BRACKET || cp === RIGHT_CURLY_BRACKET) {
|
|
688
718
|
this.raise("Lone quantifier brackets");
|
|
689
719
|
}
|
|
690
720
|
const c = String.fromCodePoint(cp);
|
|
@@ -707,21 +737,21 @@ class RegExpValidator {
|
|
|
707
737
|
if (escaped) {
|
|
708
738
|
escaped = false;
|
|
709
739
|
}
|
|
710
|
-
else if (cp ===
|
|
740
|
+
else if (cp === REVERSE_SOLIDUS) {
|
|
711
741
|
escaped = true;
|
|
712
742
|
}
|
|
713
|
-
else if (cp ===
|
|
743
|
+
else if (cp === LEFT_SQUARE_BRACKET) {
|
|
714
744
|
inClass = true;
|
|
715
745
|
}
|
|
716
|
-
else if (cp ===
|
|
746
|
+
else if (cp === RIGHT_SQUARE_BRACKET) {
|
|
717
747
|
inClass = false;
|
|
718
748
|
}
|
|
719
|
-
else if (cp ===
|
|
749
|
+
else if (cp === LEFT_PARENTHESIS &&
|
|
720
750
|
!inClass &&
|
|
721
|
-
(this.nextCodePoint !==
|
|
722
|
-
(this.nextCodePoint2 ===
|
|
723
|
-
this.nextCodePoint3 !==
|
|
724
|
-
this.nextCodePoint3 !==
|
|
751
|
+
(this.nextCodePoint !== QUESTION_MARK ||
|
|
752
|
+
(this.nextCodePoint2 === LESS_THAN_SIGN &&
|
|
753
|
+
this.nextCodePoint3 !== EQUALS_SIGN &&
|
|
754
|
+
this.nextCodePoint3 !== EXCLAMATION_MARK))) {
|
|
725
755
|
count += 1;
|
|
726
756
|
}
|
|
727
757
|
this.advance();
|
|
@@ -735,11 +765,11 @@ class RegExpValidator {
|
|
|
735
765
|
this.onDisjunctionEnter(start);
|
|
736
766
|
do {
|
|
737
767
|
this.consumeAlternative(i++);
|
|
738
|
-
} while (this.eat(
|
|
768
|
+
} while (this.eat(VERTICAL_LINE));
|
|
739
769
|
if (this.consumeQuantifier(true)) {
|
|
740
770
|
this.raise("Nothing to repeat");
|
|
741
771
|
}
|
|
742
|
-
if (this.eat(
|
|
772
|
+
if (this.eat(LEFT_CURLY_BRACKET)) {
|
|
743
773
|
this.raise("Lone quantifier brackets");
|
|
744
774
|
}
|
|
745
775
|
this.onDisjunctionLeave(start, this.index);
|
|
@@ -768,30 +798,31 @@ class RegExpValidator {
|
|
|
768
798
|
consumeAssertion() {
|
|
769
799
|
const start = this.index;
|
|
770
800
|
this._lastAssertionIsQuantifiable = false;
|
|
771
|
-
if (this.eat(
|
|
801
|
+
if (this.eat(CIRCUMFLEX_ACCENT)) {
|
|
772
802
|
this.onEdgeAssertion(start, this.index, "start");
|
|
773
803
|
return true;
|
|
774
804
|
}
|
|
775
|
-
if (this.eat(
|
|
805
|
+
if (this.eat(DOLLAR_SIGN)) {
|
|
776
806
|
this.onEdgeAssertion(start, this.index, "end");
|
|
777
807
|
return true;
|
|
778
808
|
}
|
|
779
|
-
if (this.eat2(
|
|
809
|
+
if (this.eat2(REVERSE_SOLIDUS, LATIN_CAPITAL_LETTER_B)) {
|
|
780
810
|
this.onWordBoundaryAssertion(start, this.index, "word", true);
|
|
781
811
|
return true;
|
|
782
812
|
}
|
|
783
|
-
if (this.eat2(
|
|
813
|
+
if (this.eat2(REVERSE_SOLIDUS, LATIN_SMALL_LETTER_B)) {
|
|
784
814
|
this.onWordBoundaryAssertion(start, this.index, "word", false);
|
|
785
815
|
return true;
|
|
786
816
|
}
|
|
787
|
-
if (this.eat2(
|
|
788
|
-
const lookbehind = this.ecmaVersion >= 2018 && this.eat(
|
|
817
|
+
if (this.eat2(LEFT_PARENTHESIS, QUESTION_MARK)) {
|
|
818
|
+
const lookbehind = this.ecmaVersion >= 2018 && this.eat(LESS_THAN_SIGN);
|
|
789
819
|
let negate = false;
|
|
790
|
-
if (this.eat(
|
|
820
|
+
if (this.eat(EQUALS_SIGN) ||
|
|
821
|
+
(negate = this.eat(EXCLAMATION_MARK))) {
|
|
791
822
|
const kind = lookbehind ? "lookbehind" : "lookahead";
|
|
792
823
|
this.onLookaroundAssertionEnter(start, kind, negate);
|
|
793
824
|
this.consumeDisjunction();
|
|
794
|
-
if (!this.eat(
|
|
825
|
+
if (!this.eat(RIGHT_PARENTHESIS)) {
|
|
795
826
|
this.raise("Unterminated group");
|
|
796
827
|
}
|
|
797
828
|
this._lastAssertionIsQuantifiable = !lookbehind && !this.strict;
|
|
@@ -807,15 +838,15 @@ class RegExpValidator {
|
|
|
807
838
|
let min = 0;
|
|
808
839
|
let max = 0;
|
|
809
840
|
let greedy = false;
|
|
810
|
-
if (this.eat(
|
|
841
|
+
if (this.eat(ASTERISK)) {
|
|
811
842
|
min = 0;
|
|
812
843
|
max = Number.POSITIVE_INFINITY;
|
|
813
844
|
}
|
|
814
|
-
else if (this.eat(
|
|
845
|
+
else if (this.eat(PLUS_SIGN)) {
|
|
815
846
|
min = 1;
|
|
816
847
|
max = Number.POSITIVE_INFINITY;
|
|
817
848
|
}
|
|
818
|
-
else if (this.eat(
|
|
849
|
+
else if (this.eat(QUESTION_MARK)) {
|
|
819
850
|
min = 0;
|
|
820
851
|
max = 1;
|
|
821
852
|
}
|
|
@@ -826,7 +857,7 @@ class RegExpValidator {
|
|
|
826
857
|
else {
|
|
827
858
|
return false;
|
|
828
859
|
}
|
|
829
|
-
greedy = !this.eat(
|
|
860
|
+
greedy = !this.eat(QUESTION_MARK);
|
|
830
861
|
if (!noConsume) {
|
|
831
862
|
this.onQuantifier(start, this.index, min, max, greedy);
|
|
832
863
|
}
|
|
@@ -834,17 +865,17 @@ class RegExpValidator {
|
|
|
834
865
|
}
|
|
835
866
|
eatBracedQuantifier(noError) {
|
|
836
867
|
const start = this.index;
|
|
837
|
-
if (this.eat(
|
|
868
|
+
if (this.eat(LEFT_CURLY_BRACKET)) {
|
|
838
869
|
this._lastMinValue = 0;
|
|
839
870
|
this._lastMaxValue = Number.POSITIVE_INFINITY;
|
|
840
871
|
if (this.eatDecimalDigits()) {
|
|
841
872
|
this._lastMinValue = this._lastMaxValue = this._lastIntValue;
|
|
842
|
-
if (this.eat(
|
|
873
|
+
if (this.eat(COMMA)) {
|
|
843
874
|
this._lastMaxValue = this.eatDecimalDigits()
|
|
844
875
|
? this._lastIntValue
|
|
845
876
|
: Number.POSITIVE_INFINITY;
|
|
846
877
|
}
|
|
847
|
-
if (this.eat(
|
|
878
|
+
if (this.eat(RIGHT_CURLY_BRACKET)) {
|
|
848
879
|
if (!noError && this._lastMaxValue < this._lastMinValue) {
|
|
849
880
|
this.raise("numbers out of order in {} quantifier");
|
|
850
881
|
}
|
|
@@ -867,7 +898,7 @@ class RegExpValidator {
|
|
|
867
898
|
this.consumeCapturingGroup());
|
|
868
899
|
}
|
|
869
900
|
consumeDot() {
|
|
870
|
-
if (this.eat(
|
|
901
|
+
if (this.eat(FULL_STOP)) {
|
|
871
902
|
this.onAnyCharacterSet(this.index - 1, this.index, "any");
|
|
872
903
|
return true;
|
|
873
904
|
}
|
|
@@ -875,7 +906,7 @@ class RegExpValidator {
|
|
|
875
906
|
}
|
|
876
907
|
consumeReverseSolidusAtomEscape() {
|
|
877
908
|
const start = this.index;
|
|
878
|
-
if (this.eat(
|
|
909
|
+
if (this.eat(REVERSE_SOLIDUS)) {
|
|
879
910
|
if (this.consumeAtomEscape()) {
|
|
880
911
|
return true;
|
|
881
912
|
}
|
|
@@ -885,10 +916,10 @@ class RegExpValidator {
|
|
|
885
916
|
}
|
|
886
917
|
consumeUncapturingGroup() {
|
|
887
918
|
const start = this.index;
|
|
888
|
-
if (this.eat3(
|
|
919
|
+
if (this.eat3(LEFT_PARENTHESIS, QUESTION_MARK, COLON)) {
|
|
889
920
|
this.onGroupEnter(start);
|
|
890
921
|
this.consumeDisjunction();
|
|
891
|
-
if (!this.eat(
|
|
922
|
+
if (!this.eat(RIGHT_PARENTHESIS)) {
|
|
892
923
|
this.raise("Unterminated group");
|
|
893
924
|
}
|
|
894
925
|
this.onGroupLeave(start, this.index);
|
|
@@ -898,19 +929,19 @@ class RegExpValidator {
|
|
|
898
929
|
}
|
|
899
930
|
consumeCapturingGroup() {
|
|
900
931
|
const start = this.index;
|
|
901
|
-
if (this.eat(
|
|
932
|
+
if (this.eat(LEFT_PARENTHESIS)) {
|
|
902
933
|
let name = null;
|
|
903
934
|
if (this.ecmaVersion >= 2018) {
|
|
904
935
|
if (this.consumeGroupSpecifier()) {
|
|
905
936
|
name = this._lastStrValue;
|
|
906
937
|
}
|
|
907
938
|
}
|
|
908
|
-
else if (this.currentCodePoint ===
|
|
939
|
+
else if (this.currentCodePoint === QUESTION_MARK) {
|
|
909
940
|
this.raise("Invalid group");
|
|
910
941
|
}
|
|
911
942
|
this.onCapturingGroupEnter(start, name);
|
|
912
943
|
this.consumeDisjunction();
|
|
913
|
-
if (!this.eat(
|
|
944
|
+
if (!this.eat(RIGHT_PARENTHESIS)) {
|
|
914
945
|
this.raise("Unterminated group");
|
|
915
946
|
}
|
|
916
947
|
this.onCapturingGroupLeave(start, this.index, name);
|
|
@@ -930,11 +961,11 @@ class RegExpValidator {
|
|
|
930
961
|
}
|
|
931
962
|
consumeReverseSolidusFollowedByC() {
|
|
932
963
|
const start = this.index;
|
|
933
|
-
if (this.currentCodePoint ===
|
|
934
|
-
this.nextCodePoint ===
|
|
964
|
+
if (this.currentCodePoint === REVERSE_SOLIDUS &&
|
|
965
|
+
this.nextCodePoint === LATIN_SMALL_LETTER_C) {
|
|
935
966
|
this._lastIntValue = this.currentCodePoint;
|
|
936
967
|
this.advance();
|
|
937
|
-
this.onCharacter(start, this.index,
|
|
968
|
+
this.onCharacter(start, this.index, REVERSE_SOLIDUS);
|
|
938
969
|
return true;
|
|
939
970
|
}
|
|
940
971
|
return false;
|
|
@@ -959,17 +990,17 @@ class RegExpValidator {
|
|
|
959
990
|
const start = this.index;
|
|
960
991
|
const cp = this.currentCodePoint;
|
|
961
992
|
if (cp !== -1 &&
|
|
962
|
-
cp !==
|
|
963
|
-
cp !==
|
|
964
|
-
cp !==
|
|
965
|
-
cp !==
|
|
966
|
-
cp !==
|
|
967
|
-
cp !==
|
|
968
|
-
cp !==
|
|
969
|
-
cp !==
|
|
970
|
-
cp !==
|
|
971
|
-
cp !==
|
|
972
|
-
cp !==
|
|
993
|
+
cp !== CIRCUMFLEX_ACCENT &&
|
|
994
|
+
cp !== DOLLAR_SIGN &&
|
|
995
|
+
cp !== REVERSE_SOLIDUS &&
|
|
996
|
+
cp !== FULL_STOP &&
|
|
997
|
+
cp !== ASTERISK &&
|
|
998
|
+
cp !== PLUS_SIGN &&
|
|
999
|
+
cp !== QUESTION_MARK &&
|
|
1000
|
+
cp !== LEFT_PARENTHESIS &&
|
|
1001
|
+
cp !== RIGHT_PARENTHESIS &&
|
|
1002
|
+
cp !== LEFT_SQUARE_BRACKET &&
|
|
1003
|
+
cp !== VERTICAL_LINE) {
|
|
973
1004
|
this.advance();
|
|
974
1005
|
this.onCharacter(start, this.index, cp);
|
|
975
1006
|
return true;
|
|
@@ -977,7 +1008,7 @@ class RegExpValidator {
|
|
|
977
1008
|
return false;
|
|
978
1009
|
}
|
|
979
1010
|
consumeGroupSpecifier() {
|
|
980
|
-
if (this.eat(
|
|
1011
|
+
if (this.eat(QUESTION_MARK)) {
|
|
981
1012
|
if (this.eatGroupName()) {
|
|
982
1013
|
if (!this._groupNames.has(this._lastStrValue)) {
|
|
983
1014
|
this._groupNames.add(this._lastStrValue);
|
|
@@ -1018,32 +1049,32 @@ class RegExpValidator {
|
|
|
1018
1049
|
}
|
|
1019
1050
|
consumeCharacterClassEscape() {
|
|
1020
1051
|
const start = this.index;
|
|
1021
|
-
if (this.eat(
|
|
1052
|
+
if (this.eat(LATIN_SMALL_LETTER_D)) {
|
|
1022
1053
|
this._lastIntValue = -1;
|
|
1023
1054
|
this.onEscapeCharacterSet(start - 1, this.index, "digit", false);
|
|
1024
1055
|
return true;
|
|
1025
1056
|
}
|
|
1026
|
-
if (this.eat(
|
|
1057
|
+
if (this.eat(LATIN_CAPITAL_LETTER_D)) {
|
|
1027
1058
|
this._lastIntValue = -1;
|
|
1028
1059
|
this.onEscapeCharacterSet(start - 1, this.index, "digit", true);
|
|
1029
1060
|
return true;
|
|
1030
1061
|
}
|
|
1031
|
-
if (this.eat(
|
|
1062
|
+
if (this.eat(LATIN_SMALL_LETTER_S)) {
|
|
1032
1063
|
this._lastIntValue = -1;
|
|
1033
1064
|
this.onEscapeCharacterSet(start - 1, this.index, "space", false);
|
|
1034
1065
|
return true;
|
|
1035
1066
|
}
|
|
1036
|
-
if (this.eat(
|
|
1067
|
+
if (this.eat(LATIN_CAPITAL_LETTER_S)) {
|
|
1037
1068
|
this._lastIntValue = -1;
|
|
1038
1069
|
this.onEscapeCharacterSet(start - 1, this.index, "space", true);
|
|
1039
1070
|
return true;
|
|
1040
1071
|
}
|
|
1041
|
-
if (this.eat(
|
|
1072
|
+
if (this.eat(LATIN_SMALL_LETTER_W)) {
|
|
1042
1073
|
this._lastIntValue = -1;
|
|
1043
1074
|
this.onEscapeCharacterSet(start - 1, this.index, "word", false);
|
|
1044
1075
|
return true;
|
|
1045
1076
|
}
|
|
1046
|
-
if (this.eat(
|
|
1077
|
+
if (this.eat(LATIN_CAPITAL_LETTER_W)) {
|
|
1047
1078
|
this._lastIntValue = -1;
|
|
1048
1079
|
this.onEscapeCharacterSet(start - 1, this.index, "word", true);
|
|
1049
1080
|
return true;
|
|
@@ -1051,12 +1082,12 @@ class RegExpValidator {
|
|
|
1051
1082
|
let negate = false;
|
|
1052
1083
|
if (this._uFlag &&
|
|
1053
1084
|
this.ecmaVersion >= 2018 &&
|
|
1054
|
-
(this.eat(
|
|
1055
|
-
(negate = this.eat(
|
|
1085
|
+
(this.eat(LATIN_SMALL_LETTER_P) ||
|
|
1086
|
+
(negate = this.eat(LATIN_CAPITAL_LETTER_P)))) {
|
|
1056
1087
|
this._lastIntValue = -1;
|
|
1057
|
-
if (this.eat(
|
|
1088
|
+
if (this.eat(LEFT_CURLY_BRACKET) &&
|
|
1058
1089
|
this.eatUnicodePropertyValueExpression() &&
|
|
1059
|
-
this.eat(
|
|
1090
|
+
this.eat(RIGHT_CURLY_BRACKET)) {
|
|
1060
1091
|
this.onUnicodePropertyCharacterSet(start - 1, this.index, "property", this._lastKeyValue, this._lastValValue || null, negate);
|
|
1061
1092
|
return true;
|
|
1062
1093
|
}
|
|
@@ -1082,7 +1113,7 @@ class RegExpValidator {
|
|
|
1082
1113
|
}
|
|
1083
1114
|
consumeKGroupName() {
|
|
1084
1115
|
const start = this.index;
|
|
1085
|
-
if (this.eat(
|
|
1116
|
+
if (this.eat(LATIN_SMALL_LETTER_K)) {
|
|
1086
1117
|
if (this.eatGroupName()) {
|
|
1087
1118
|
const groupName = this._lastStrValue;
|
|
1088
1119
|
this._backreferenceNames.add(groupName);
|
|
@@ -1095,11 +1126,11 @@ class RegExpValidator {
|
|
|
1095
1126
|
}
|
|
1096
1127
|
consumeCharacterClass() {
|
|
1097
1128
|
const start = this.index;
|
|
1098
|
-
if (this.eat(
|
|
1099
|
-
const negate = this.eat(
|
|
1129
|
+
if (this.eat(LEFT_SQUARE_BRACKET)) {
|
|
1130
|
+
const negate = this.eat(CIRCUMFLEX_ACCENT);
|
|
1100
1131
|
this.onCharacterClassEnter(start, negate);
|
|
1101
1132
|
this.consumeClassRanges();
|
|
1102
|
-
if (!this.eat(
|
|
1133
|
+
if (!this.eat(RIGHT_SQUARE_BRACKET)) {
|
|
1103
1134
|
this.raise("Unterminated character class");
|
|
1104
1135
|
}
|
|
1105
1136
|
this.onCharacterClassLeave(start, this.index, negate);
|
|
@@ -1115,10 +1146,10 @@ class RegExpValidator {
|
|
|
1115
1146
|
break;
|
|
1116
1147
|
}
|
|
1117
1148
|
const min = this._lastIntValue;
|
|
1118
|
-
if (!this.eat(
|
|
1149
|
+
if (!this.eat(HYPHEN_MINUS)) {
|
|
1119
1150
|
continue;
|
|
1120
1151
|
}
|
|
1121
|
-
this.onCharacter(this.index - 1, this.index,
|
|
1152
|
+
this.onCharacter(this.index - 1, this.index, HYPHEN_MINUS);
|
|
1122
1153
|
if (!this.consumeClassAtom()) {
|
|
1123
1154
|
break;
|
|
1124
1155
|
}
|
|
@@ -1138,18 +1169,21 @@ class RegExpValidator {
|
|
|
1138
1169
|
consumeClassAtom() {
|
|
1139
1170
|
const start = this.index;
|
|
1140
1171
|
const cp = this.currentCodePoint;
|
|
1141
|
-
if (cp !== -1 &&
|
|
1172
|
+
if (cp !== -1 &&
|
|
1173
|
+
cp !== REVERSE_SOLIDUS &&
|
|
1174
|
+
cp !== RIGHT_SQUARE_BRACKET) {
|
|
1142
1175
|
this.advance();
|
|
1143
1176
|
this._lastIntValue = cp;
|
|
1144
1177
|
this.onCharacter(start, this.index, this._lastIntValue);
|
|
1145
1178
|
return true;
|
|
1146
1179
|
}
|
|
1147
|
-
if (this.eat(
|
|
1180
|
+
if (this.eat(REVERSE_SOLIDUS)) {
|
|
1148
1181
|
if (this.consumeClassEscape()) {
|
|
1149
1182
|
return true;
|
|
1150
1183
|
}
|
|
1151
|
-
if (!this.strict &&
|
|
1152
|
-
this.
|
|
1184
|
+
if (!this.strict &&
|
|
1185
|
+
this.currentCodePoint === LATIN_SMALL_LETTER_C) {
|
|
1186
|
+
this._lastIntValue = REVERSE_SOLIDUS;
|
|
1153
1187
|
this.onCharacter(start, this.index, this._lastIntValue);
|
|
1154
1188
|
return true;
|
|
1155
1189
|
}
|
|
@@ -1162,21 +1196,21 @@ class RegExpValidator {
|
|
|
1162
1196
|
}
|
|
1163
1197
|
consumeClassEscape() {
|
|
1164
1198
|
const start = this.index;
|
|
1165
|
-
if (this.eat(
|
|
1166
|
-
this._lastIntValue =
|
|
1199
|
+
if (this.eat(LATIN_SMALL_LETTER_B)) {
|
|
1200
|
+
this._lastIntValue = BACKSPACE;
|
|
1167
1201
|
this.onCharacter(start - 1, this.index, this._lastIntValue);
|
|
1168
1202
|
return true;
|
|
1169
1203
|
}
|
|
1170
|
-
if (this._uFlag && this.eat(
|
|
1171
|
-
this._lastIntValue =
|
|
1204
|
+
if (this._uFlag && this.eat(HYPHEN_MINUS)) {
|
|
1205
|
+
this._lastIntValue = HYPHEN_MINUS;
|
|
1172
1206
|
this.onCharacter(start - 1, this.index, this._lastIntValue);
|
|
1173
1207
|
return true;
|
|
1174
1208
|
}
|
|
1175
1209
|
let cp = 0;
|
|
1176
1210
|
if (!this.strict &&
|
|
1177
1211
|
!this._uFlag &&
|
|
1178
|
-
this.currentCodePoint ===
|
|
1179
|
-
(isDecimalDigit((cp = this.nextCodePoint)) || cp ===
|
|
1212
|
+
this.currentCodePoint === LATIN_SMALL_LETTER_C &&
|
|
1213
|
+
(isDecimalDigit((cp = this.nextCodePoint)) || cp === LOW_LINE)) {
|
|
1180
1214
|
this.advance();
|
|
1181
1215
|
this.advance();
|
|
1182
1216
|
this._lastIntValue = cp % 0x20;
|
|
@@ -1186,8 +1220,8 @@ class RegExpValidator {
|
|
|
1186
1220
|
return (this.consumeCharacterClassEscape() || this.consumeCharacterEscape());
|
|
1187
1221
|
}
|
|
1188
1222
|
eatGroupName() {
|
|
1189
|
-
if (this.eat(
|
|
1190
|
-
if (this.eatRegExpIdentifierName() && this.eat(
|
|
1223
|
+
if (this.eat(LESS_THAN_SIGN)) {
|
|
1224
|
+
if (this.eatRegExpIdentifierName() && this.eat(GREATER_THAN_SIGN)) {
|
|
1191
1225
|
return true;
|
|
1192
1226
|
}
|
|
1193
1227
|
this.raise("Invalid capture group name");
|
|
@@ -1209,7 +1243,7 @@ class RegExpValidator {
|
|
|
1209
1243
|
const forceUFlag = !this._uFlag && this.ecmaVersion >= 2020;
|
|
1210
1244
|
let cp = this.currentCodePoint;
|
|
1211
1245
|
this.advance();
|
|
1212
|
-
if (cp ===
|
|
1246
|
+
if (cp === REVERSE_SOLIDUS &&
|
|
1213
1247
|
this.eatRegExpUnicodeEscapeSequence(forceUFlag)) {
|
|
1214
1248
|
cp = this._lastIntValue;
|
|
1215
1249
|
}
|
|
@@ -1233,7 +1267,7 @@ class RegExpValidator {
|
|
|
1233
1267
|
const forceUFlag = !this._uFlag && this.ecmaVersion >= 2020;
|
|
1234
1268
|
let cp = this.currentCodePoint;
|
|
1235
1269
|
this.advance();
|
|
1236
|
-
if (cp ===
|
|
1270
|
+
if (cp === REVERSE_SOLIDUS &&
|
|
1237
1271
|
this.eatRegExpUnicodeEscapeSequence(forceUFlag)) {
|
|
1238
1272
|
cp = this._lastIntValue;
|
|
1239
1273
|
}
|
|
@@ -1254,7 +1288,7 @@ class RegExpValidator {
|
|
|
1254
1288
|
}
|
|
1255
1289
|
eatCControlLetter() {
|
|
1256
1290
|
const start = this.index;
|
|
1257
|
-
if (this.eat(
|
|
1291
|
+
if (this.eat(LATIN_SMALL_LETTER_C)) {
|
|
1258
1292
|
if (this.eatControlLetter()) {
|
|
1259
1293
|
return true;
|
|
1260
1294
|
}
|
|
@@ -1263,7 +1297,7 @@ class RegExpValidator {
|
|
|
1263
1297
|
return false;
|
|
1264
1298
|
}
|
|
1265
1299
|
eatZero() {
|
|
1266
|
-
if (this.currentCodePoint ===
|
|
1300
|
+
if (this.currentCodePoint === DIGIT_ZERO &&
|
|
1267
1301
|
!isDecimalDigit(this.nextCodePoint)) {
|
|
1268
1302
|
this._lastIntValue = 0;
|
|
1269
1303
|
this.advance();
|
|
@@ -1272,24 +1306,24 @@ class RegExpValidator {
|
|
|
1272
1306
|
return false;
|
|
1273
1307
|
}
|
|
1274
1308
|
eatControlEscape() {
|
|
1275
|
-
if (this.eat(
|
|
1276
|
-
this._lastIntValue =
|
|
1309
|
+
if (this.eat(LATIN_SMALL_LETTER_F)) {
|
|
1310
|
+
this._lastIntValue = FORM_FEED;
|
|
1277
1311
|
return true;
|
|
1278
1312
|
}
|
|
1279
|
-
if (this.eat(
|
|
1280
|
-
this._lastIntValue =
|
|
1313
|
+
if (this.eat(LATIN_SMALL_LETTER_N)) {
|
|
1314
|
+
this._lastIntValue = LINE_FEED;
|
|
1281
1315
|
return true;
|
|
1282
1316
|
}
|
|
1283
|
-
if (this.eat(
|
|
1284
|
-
this._lastIntValue =
|
|
1317
|
+
if (this.eat(LATIN_SMALL_LETTER_R)) {
|
|
1318
|
+
this._lastIntValue = CARRIAGE_RETURN;
|
|
1285
1319
|
return true;
|
|
1286
1320
|
}
|
|
1287
|
-
if (this.eat(
|
|
1288
|
-
this._lastIntValue =
|
|
1321
|
+
if (this.eat(LATIN_SMALL_LETTER_T)) {
|
|
1322
|
+
this._lastIntValue = CHARACTER_TABULATION;
|
|
1289
1323
|
return true;
|
|
1290
1324
|
}
|
|
1291
|
-
if (this.eat(
|
|
1292
|
-
this._lastIntValue =
|
|
1325
|
+
if (this.eat(LATIN_SMALL_LETTER_V)) {
|
|
1326
|
+
this._lastIntValue = LINE_TABULATION;
|
|
1293
1327
|
return true;
|
|
1294
1328
|
}
|
|
1295
1329
|
return false;
|
|
@@ -1306,7 +1340,7 @@ class RegExpValidator {
|
|
|
1306
1340
|
eatRegExpUnicodeEscapeSequence(forceUFlag = false) {
|
|
1307
1341
|
const start = this.index;
|
|
1308
1342
|
const uFlag = forceUFlag || this._uFlag;
|
|
1309
|
-
if (this.eat(
|
|
1343
|
+
if (this.eat(LATIN_SMALL_LETTER_U)) {
|
|
1310
1344
|
if ((uFlag && this.eatRegExpUnicodeSurrogatePairEscape()) ||
|
|
1311
1345
|
this.eatFixedHexDigits(4) ||
|
|
1312
1346
|
(uFlag && this.eatRegExpUnicodeCodePointEscape())) {
|
|
@@ -1324,8 +1358,8 @@ class RegExpValidator {
|
|
|
1324
1358
|
if (this.eatFixedHexDigits(4)) {
|
|
1325
1359
|
const lead = this._lastIntValue;
|
|
1326
1360
|
if (isLeadSurrogate(lead) &&
|
|
1327
|
-
this.eat(
|
|
1328
|
-
this.eat(
|
|
1361
|
+
this.eat(REVERSE_SOLIDUS) &&
|
|
1362
|
+
this.eat(LATIN_SMALL_LETTER_U) &&
|
|
1329
1363
|
this.eatFixedHexDigits(4)) {
|
|
1330
1364
|
const trail = this._lastIntValue;
|
|
1331
1365
|
if (isTrailSurrogate(trail)) {
|
|
@@ -1339,9 +1373,9 @@ class RegExpValidator {
|
|
|
1339
1373
|
}
|
|
1340
1374
|
eatRegExpUnicodeCodePointEscape() {
|
|
1341
1375
|
const start = this.index;
|
|
1342
|
-
if (this.eat(
|
|
1376
|
+
if (this.eat(LEFT_CURLY_BRACKET) &&
|
|
1343
1377
|
this.eatHexDigits() &&
|
|
1344
|
-
this.eat(
|
|
1378
|
+
this.eat(RIGHT_CURLY_BRACKET) &&
|
|
1345
1379
|
isValidUnicode(this._lastIntValue)) {
|
|
1346
1380
|
return true;
|
|
1347
1381
|
}
|
|
@@ -1362,32 +1396,32 @@ class RegExpValidator {
|
|
|
1362
1396
|
return false;
|
|
1363
1397
|
}
|
|
1364
1398
|
if (this._uFlag) {
|
|
1365
|
-
return isSyntaxCharacter(cp) || cp ===
|
|
1399
|
+
return isSyntaxCharacter(cp) || cp === SOLIDUS;
|
|
1366
1400
|
}
|
|
1367
1401
|
if (this.strict) {
|
|
1368
1402
|
return !isIdContinue(cp);
|
|
1369
1403
|
}
|
|
1370
1404
|
if (this._nFlag) {
|
|
1371
|
-
return !(cp ===
|
|
1405
|
+
return !(cp === LATIN_SMALL_LETTER_C || cp === LATIN_SMALL_LETTER_K);
|
|
1372
1406
|
}
|
|
1373
|
-
return cp !==
|
|
1407
|
+
return cp !== LATIN_SMALL_LETTER_C;
|
|
1374
1408
|
}
|
|
1375
1409
|
eatDecimalEscape() {
|
|
1376
1410
|
this._lastIntValue = 0;
|
|
1377
1411
|
let cp = this.currentCodePoint;
|
|
1378
|
-
if (cp >=
|
|
1412
|
+
if (cp >= DIGIT_ONE && cp <= DIGIT_NINE) {
|
|
1379
1413
|
do {
|
|
1380
|
-
this._lastIntValue = 10 * this._lastIntValue + (cp -
|
|
1414
|
+
this._lastIntValue = 10 * this._lastIntValue + (cp - DIGIT_ZERO);
|
|
1381
1415
|
this.advance();
|
|
1382
|
-
} while ((cp = this.currentCodePoint) >=
|
|
1383
|
-
cp <=
|
|
1416
|
+
} while ((cp = this.currentCodePoint) >= DIGIT_ZERO &&
|
|
1417
|
+
cp <= DIGIT_NINE);
|
|
1384
1418
|
return true;
|
|
1385
1419
|
}
|
|
1386
1420
|
return false;
|
|
1387
1421
|
}
|
|
1388
1422
|
eatUnicodePropertyValueExpression() {
|
|
1389
1423
|
const start = this.index;
|
|
1390
|
-
if (this.eatUnicodePropertyName() && this.eat(
|
|
1424
|
+
if (this.eatUnicodePropertyName() && this.eat(EQUALS_SIGN)) {
|
|
1391
1425
|
this._lastKeyValue = this._lastStrValue;
|
|
1392
1426
|
if (this.eatUnicodePropertyValue()) {
|
|
1393
1427
|
this._lastValValue = this._lastStrValue;
|
|
@@ -1435,7 +1469,7 @@ class RegExpValidator {
|
|
|
1435
1469
|
}
|
|
1436
1470
|
eatHexEscapeSequence() {
|
|
1437
1471
|
const start = this.index;
|
|
1438
|
-
if (this.eat(
|
|
1472
|
+
if (this.eat(LATIN_SMALL_LETTER_X)) {
|
|
1439
1473
|
if (this.eatFixedHexDigits(2)) {
|
|
1440
1474
|
return true;
|
|
1441
1475
|
}
|
|
@@ -1489,7 +1523,7 @@ class RegExpValidator {
|
|
|
1489
1523
|
const cp = this.currentCodePoint;
|
|
1490
1524
|
if (isOctalDigit(cp)) {
|
|
1491
1525
|
this.advance();
|
|
1492
|
-
this._lastIntValue = cp -
|
|
1526
|
+
this._lastIntValue = cp - DIGIT_ZERO;
|
|
1493
1527
|
return true;
|
|
1494
1528
|
}
|
|
1495
1529
|
this._lastIntValue = 0;
|
|
@@ -1511,18 +1545,19 @@ class RegExpValidator {
|
|
|
1511
1545
|
}
|
|
1512
1546
|
}
|
|
1513
1547
|
|
|
1514
|
-
const
|
|
1515
|
-
const
|
|
1516
|
-
const
|
|
1548
|
+
const DUMMY_PATTERN = {};
|
|
1549
|
+
const DUMMY_FLAGS = {};
|
|
1550
|
+
const DUMMY_CAPTURING_GROUP = {};
|
|
1517
1551
|
class RegExpParserState {
|
|
1518
1552
|
constructor(options) {
|
|
1519
|
-
|
|
1520
|
-
this.
|
|
1553
|
+
var _a;
|
|
1554
|
+
this._node = DUMMY_PATTERN;
|
|
1555
|
+
this._flags = DUMMY_FLAGS;
|
|
1521
1556
|
this._backreferences = [];
|
|
1522
1557
|
this._capturingGroups = [];
|
|
1523
1558
|
this.source = "";
|
|
1524
|
-
this.strict = Boolean(options
|
|
1525
|
-
this.ecmaVersion = (options
|
|
1559
|
+
this.strict = Boolean(options === null || options === void 0 ? void 0 : options.strict);
|
|
1560
|
+
this.ecmaVersion = (_a = options === null || options === void 0 ? void 0 : options.ecmaVersion) !== null && _a !== void 0 ? _a : 2023;
|
|
1526
1561
|
}
|
|
1527
1562
|
get pattern() {
|
|
1528
1563
|
if (this._node.type !== "Pattern") {
|
|
@@ -1536,7 +1571,7 @@ class RegExpParserState {
|
|
|
1536
1571
|
}
|
|
1537
1572
|
return this._flags;
|
|
1538
1573
|
}
|
|
1539
|
-
|
|
1574
|
+
onRegExpFlags(start, end, { global, ignoreCase, multiline, unicode, sticky, dotAll, hasIndices, }) {
|
|
1540
1575
|
this._flags = {
|
|
1541
1576
|
type: "Flags",
|
|
1542
1577
|
parent: null,
|
|
@@ -1571,7 +1606,7 @@ class RegExpParserState {
|
|
|
1571
1606
|
const ref = reference.ref;
|
|
1572
1607
|
const group = typeof ref === "number"
|
|
1573
1608
|
? this._capturingGroups[ref - 1]
|
|
1574
|
-
: this._capturingGroups.find(g => g.name === ref);
|
|
1609
|
+
: this._capturingGroups.find((g) => g.name === ref);
|
|
1575
1610
|
reference.resolved = group;
|
|
1576
1611
|
group.references.push(reference);
|
|
1577
1612
|
}
|
|
@@ -1807,7 +1842,7 @@ class RegExpParserState {
|
|
|
1807
1842
|
end,
|
|
1808
1843
|
raw: this.source.slice(start, end),
|
|
1809
1844
|
ref,
|
|
1810
|
-
resolved:
|
|
1845
|
+
resolved: DUMMY_CAPTURING_GROUP,
|
|
1811
1846
|
};
|
|
1812
1847
|
parent.elements.push(node);
|
|
1813
1848
|
this._backreferences.push(node);
|
|
@@ -1853,7 +1888,7 @@ class RegExpParserState {
|
|
|
1853
1888
|
min.type !== "Character" ||
|
|
1854
1889
|
max.type !== "Character" ||
|
|
1855
1890
|
hyphen.type !== "Character" ||
|
|
1856
|
-
hyphen.value !==
|
|
1891
|
+
hyphen.value !== HYPHEN_MINUS) {
|
|
1857
1892
|
throw new Error("UnknownError");
|
|
1858
1893
|
}
|
|
1859
1894
|
const node = {
|
|
@@ -2077,7 +2112,7 @@ function parseRegExpLiteral(source, options) {
|
|
|
2077
2112
|
return new RegExpParser(options).parseLiteral(String(source));
|
|
2078
2113
|
}
|
|
2079
2114
|
function validateRegExpLiteral(source, options) {
|
|
2080
|
-
|
|
2115
|
+
new RegExpValidator(options).validateLiteral(source);
|
|
2081
2116
|
}
|
|
2082
2117
|
function visitRegExpAST(node, handlers) {
|
|
2083
2118
|
new RegExpVisitor(handlers).visit(node);
|